yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Learn to code in 60 seconds #programming #computerscience #python #khanacademy


less than 1m read
·Nov 10, 2024

Learn to code in 60 seconds. A program is a coded set of instructions for a computer to execute. Programs manipulate data, which come in several data types: integers, that's whole numbers; floats, have decimal points; booleans, true or false; and strings, of characters (don't forget the quotation marks).

Need to store a piece of data for later use? A variable names its location and points to it. Have a bunch of data? Organize it with a data structure. Lists store data in an ordered sequence, but we start counting at an index of zero. Dictionaries associate each piece of data with a key for easy lookup.

To make decisions in a program, ask a question with a Boolean expression. Then, choose which path to take with an if statement. To repeat a code routine, use a loop. A while loop repeats until the answer to your question becomes false. A for loop repeats a fixed number of times.

Have a lot of code? Break it down into smaller tasks with functions. Customize the function with input arguments and call the function to execute its task. Did you catch all that? Take it at your own pace with Khan Academy's intro to computer science course.

More Articles

View All
Princess! NOOOO! ... IMG! #32
This is how Easter eggs are made. And don’t walk. Or bike. It’s episode 32 of IMG! Best haircut… ever. And creepy t-shirt Abraham Lincoln. But hunting is awesome. Oh. Lishoffs rules. He made the Simpson’s alphabet, a superhero alphabet and curser bullies.…
Exploring Buenos Aires | National Geographic
When I first visited Buenos Aires, I immediately fell in love. To me, there’s no city like this in the entire world. My name is Kristen Borg; I’m a travel enthusiast and a contributor for National Geographic. I first came through here on my way to Patagon…
Meet Six Rescued Rhinos That Survived Poaching | Short Film Showcase
Dingle, darlin’, lion’s den. They both lost their horns to poaching. They hit Worden family one day. Nice. How could the other panic? In his voice he said, “Are you, are you nuts? Press!” I said, “I said game drivers has come in, reported they were raided…
The 7 BEST Purchases to make in your 20s
Hey guys, welcome back to the channel! In this video, we’re going to be talking about seven smart purchases that I think you should make when you’re still in your 20s. So I went down a bit of a YouTube rabbit hole and I saw a lot of people making differen…
Long run and short run Phillips curves
Let’s talk a little bit about the short run and long run Phillips curve. Now, they’re named after the economist Bill Phillips, who saw in the 1950s what looked like an inverse relationship between inflation and the unemployment rate. He was studying decad…
Mayans and Teotihuacan | World History | Khan Academy
The Mayan civilization is one of the most long-lasting civilizations, not just in the ancient Americas, but in the world in general. You can see the rough outline here on this map of where the Mayan civilization occurred. You can see it has the Yucatan Pe…