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
$500 MILLION DOLLARS - Smarter Every Day 179
Five hundred million dollars— that’s a lot of money! If someone just handed you five hundred million dollars and said, “Here, go do something good for society,” what would you do? I don’t know if you know it, but society is kind of divided right now. It’s…
Meru: Risk and Responsibility in Climbing | Nat Geo Live
Jimmy: The thing about this film is that the intention behind it was to show a side of climbing that I didn’t think that mainstream audience really got. We embarked in 2008 on this climb and started shooting together, but one of the themes that we talk ab…
Advice on Organizing and Running Growth Teams from Dan Hockenmaier and Gustaf Alströmer
Today we have Dan Hakan Meyer and Gustav All Strimer. So, Dan was the founder, advised investor, and advisor at Basis One, which is growth strategy consulting. Previous to that, you were a director of growth marketing at Thumbtack. Gustav’s a partner at Y…
The Gateway to Secret Underwater Worlds | Podcast | Overheard at National Geographic
We’re in the middle of winter, so the water is very cold, and the sky was gray and the sea was gray as well, with no limit. You know, when you see the sky and the sea, the sea was very flat, and there is no limit between the sea and the sky. That’s Lauren…
4 Benefits Of Being Ugly
In current day and age, everyone wants to look great. Why? Well, perhaps for social acceptance, career success, or mate selection. But looking great isn’t always great, and being ugly has a bright side. You don’t believe me? In this video, I will give you…
JOKER | Psychology & Philosophy (based on Carl Jung & Albert Camus)
The Joker is a recurring supervillain from DC comics and is the archenemy of Batman. In the many books and movies about the Joker, he is portrayed as an unpredictable, bloodthirsty, crazy psychopath that wants to see the world burn. Hence, his nicknames l…