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
Fossils 101 | National Geographic
(gentle music) [Narrator] Like buried treasure, they lie hidden from sight. Echoes of an ancient past, they whisper secrets and tell tales once lost to time. Fossils are remnants or impressions of ancient organisms that are naturally preserved in stone. …
Angles in circles word problem | Math | 4th grade | Khan Academy
If Ariana turns the stove dial 135 degrees to the right, what setting will the dial be on? So, two very important things up here: first, she’s turning the dial 135 degrees, and which way is she turning the dial? She’s turning the dial to the right. So he…
Relative adverbs | The parts of speech | Grammar | Khan Academy
Hey Grians! Today we’re going to talk about three of the relative adverbs in English, which are where, when, and why. And this over here is Peggy the Dragon. We’re going to use the story of Peggy the Dragon in order to figure out how to use these relative…
Winner Winner Raccoon Dinner! | Dirty Rotten Survival
It’s Dick’s game of choice: a good old-fashioned roadkill barbecue. Smells pretty good! These guys want modern conveniences. I’m gonna give them their food in a birch bark serving tray, Allah the hillbilly hibachi! For this roadkill cook-off, the guys wil…
The CRAZIEST stories of a Real Estate Agent (Featuring Meet Kevin)
We googled this guy’s name and we found out that this guy ended up being a romance scam artist. He would try to guilt people into having the other person put a deposit into the escrow to get past the contingency periods. So now the deposit was at risk. Th…
Estimating actual COVID 19 cases (novel corona virus infections) in an area based on deaths
The goal of this video is to help us all estimate the actual new COVID-19 cases per day in your area, and it’s based on analysis by Thomas Pueyo. He wrote an incredible blog post on Medium; this is the link, and I’ll also include it in the description bel…