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
Tagging Adorable, Nasty Little Penguins | Best Job Ever
One of the most consistent comments that I get is how adorable chinstrap penguins are. But every time you get near them, the very first thing that they do is projectile poop. They’re cantankerous; they tend to be very aggressive and just eat the food out …
Discussing Reincarnation in Hinduism | The Story of God
[Music] We think of Hinduism as having reincarnation and life after life after life. But there is really an end to that. That they’re hoping and seeking, which is to go to enlightenment. So once they’ve gone through enough, and I guess learned enough, th…
You Don't Type Alone.
Hey, Vsauce. Michael here. And thank you for clicking on this video. But how many times a day do you click? And how many times a day do you type keys on a keyboard? You might be surprised by the answer. And one of the best ways to know exactly how many ac…
shower thoughts that make me question reality..
What if your entire life is flashing in front of your eyes, but you’re already dead? If you’re not dead but alive, everything is trying to kill you constantly. Your stomach is constantly trying to kill you; feeding it makes it stop. You need to drink as w…
Steve Jobs in Sweden, 1985 [HQ]
[Music] Glad to meet you. [Applause] The doors have been locked and all of you that don’t sign up to buy computers will stay here, and we will bring back the singers. I am extraordinarily pleased to be able to be here with you. This is one of my perso…
2015 AP Chemistry free response 5 | Kinetics | Chemistry | Khan Academy
Blue food coloring can be oxidized by household bleach, which contains hypochlorite. Household bleach would usually consider being sodium hypochlorite to form colorless products, as represented by the equation above. So this is the food coloring reacts wi…