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
New Tools for Fishing | Live Free or Die
The food has been pretty, uh, minimal in the canyon here. So I’m heading to this other creek area. I’m hoping to do some fishing, and I’m also just interested to get into a new area, try to find some other food sources, and just get out and explore a litt…
Adding and subtracting fractions with negatives | 7th grade | Khan Academy
Let’s say we wanted to figure out what (3 \frac{7}{3}) minus (-\frac{7}{3}) minus (\frac{11}{3}) is. Pause this video and see if you can have a go at it before we do it together. All right, now let’s work on this together. You might be tempted to deal wi…
No Flag Northern Ireland
Poor no-flag Northern Ireland. While England, Scotland, and Wales all have flags as countries in the United Kingdom, not her. But rather than a transparent skirt of technical correctness, which would be weird, BAM! These videos use this flag that’s often …
What is a Virus? | Breakthrough
Virus is actually just genetic material encased in an envelope, and it actually needs a host like me or you in order for it to infect and continue to produce more copies of itself. So what happens is a virus infects me, let’s say, and my immune system sta…
10 science based habits i'm trying to build to improve my life🍃
Habits are building blocks of your life. If you want to change your life, or if you want to change who you are, the first step always should be looking at your current habits and determining which of them are bad and which of them are good. Changing those…
Olympic Training During a Pandemic | Podcast | Overheard at National Geographic
High jump is a part of me. This is Priscilla Frederick Loomis. She’s a track and field athlete, a high jumper, and she’s training for the 2021 Olympic Games. I look at the timer; 59 seconds remain. I fix my hair and roll back my shoulders. I look at the …