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
Esteem | Vocabulary | Khan Academy
Hey there, wordsmiths! I must tell you I feel quite good about this word, esteem. Esteem, it’s a noun; it means respect. You can hold someone in high esteem, which means you have a lot of respect for them, or you can have high self-esteem, respect for yo…
Rare Look Inside the Secret Passageway to London’s Lost Crystal Palace | National Geographic
You don’t know it’s there, so literally I can stand on that road up there and say, “Do you know what’s under your feet?” and people don’t [Music] know. This subway was a pedestrian footway from the railway station into the Crystal Palace. The Crystal Pal…
Tracking Plastic Sea to Source | Explorers Fest
The session all of you are able to stand up here and give a talk about why we need three by three. Yeah, and to get that we need to. The emotional component was beautifully put forward by a hundred ways. Now let’s talk about the brain for a little bit—the…
Peter Lynch: Why You Should Always Ignore Economic Predictions When Investing
You don’t have to go far to find dire economic predictions. Just turn on your TV or open YouTube, and you will see predictions about what will cause the next financial crisis, economic collapse, or great depression. Whether it’s caused by rising interest …
How Much Money MrBeast Makes | The Full Story
If he can make a three-pointer, I’ll tell you how much I make off YouTube. Well, I never thought that this would happen. And no, I’m not talking about being stuck inside of a makeshift jail cell, but instead getting an inside look into the business of one…
ELI the ICE man
Okay, it’s time to introduce you to a new friend: Eli the Iceman. Eli the Iceman is a friend of every electrical engineer, and what we’ve been talking about is AC analysis. In AC analysis, we limit ourselves to one type of signal, and that’s a sinusoid. T…