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
Policy | Vocabulary | Khan Academy
Hello wordsmiths! The word we’re featuring in this video is policy, which means an official rule or set of rules. It’s a noun. It comes from the Greek word polis, which means city. As a root, it has to do with cities and government. I live in Washington,…
Lecture 18 - Legal and Accounting Basics for Startups (Kirsty Nathoo, Carolynn Levy)
General C. Chrisy: “And Carollyn and I are going to talk about uh finance and legal mechanics for startups. Um this is certainly not the most exciting of the classes, sorry, but if you get this right, uh this is probably the class most… So thank you very …
First-Ever 3D VR Filmed in Space | One Strange Rock
I spent a hundred and sixty six days off the world, but somewhere along the way my perceptions of the world shifted. [Music] When you’re onboard a spaceship, you’re very much aware of the passage of time. The clock is running, your heart is beating, your…
Why Military Veterans Are Turning to Archaeology | National Geographic
Most people think of archaeology as telling us about the past. What we’re trying to do is actually use archaeology to improve people’s lives in the present. In this particular program, we’re aiming that specifically at military veterans and trying to use …
How secure is 256 bit security?
In the main video on cryptocurrencies, I made two references to situations where in order to break a given piece of security, you would have to guess a specific string of 256 bits. One of these was in the context of digital signatures, and the other in th…
YouTube Shorts is Changing YouTube - Smarter Every Day 266
Hey, it’s me, Dustin. Welcome back to Smarter Every Day! I am in the thinkI place, and today on this video, I would like to take you to the thinkI place with me. The other day, my friend’s dad said something that was like a throwaway dad comment at first.…