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
Why are snowflakes like this?
[Ken] Now, I’m gonna turn on 2000 volts. [Derek] What? And this is the first step in creating snowflakes in the lab. This is totally wild. What? Crazy, huh? The tips of those needles are like a hundred nanometers in diameter. [Derek] That is so wild.…
The pH scale | Acids and bases | AP Chemistry | Khan Academy
For a sample of pure water at 25 degrees Celsius, the concentration of hydronium ion is equal to 1.0 times 10 to the negative seventh molar. Because the concentrations are often very small, it’s much more convenient to express the concentration of hydroni…
Welcome to Earth | Official Trailer - Audio Description | Disney+
A six-part Disney Plus original series. Will Smith steps out of a red SUV. “I’ve got a confession to make,” words appear over a blue and green sphere from National Geographic. “I’ve never climbed a mountain,” Will repels down a volcano. Academy Award nomi…
The Coolest ''''Country''''' Flag You Need To Know
Antarctica is Earth’s coolest continent, and the most complicatedly claimed continent. Yet sadly, it has no official flag to unite her. Nay, you might say. There’s this! And that flag is Antarctica-associated, but it’s not official official, and comes wit…
$26,000 GOVERNMENT GRANT (Employee Retention Credit)
Why does nobody know about the employee retention credit? I want you to get this money. You’d be crazy not to get this. Instead of the car, it’s cash; it’s your cash you paid this. It pays up to twenty-six thousand dollars per employee that was on the W1 …
Would you go to a restaurant in the rainforest? | Restaurants at the End of the World
You know, it start raining. And it can get really tricky for sure. Like it can get really, really tricky. And sometimes I need to go rescue people because they get stuck then they start kind of backing up and then they go out over the edge. I don’t see a…