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
Cumulative geometric probability (greater than a value) | AP Statistics | Khan Academy
Amelia registers vehicles for the Department of Transportation. Sports utility vehicles, also known as SUVs, make up 12% of the vehicles she registers. Let V be the number of vehicles Amelia registers in a day until she first registers an SUV. Assume that…
The Evergrande Crisis Continues...
Alright guys, welcome back! It’s time for an update video on Evergrande. I told you it would be a crazy week, and it certainly was. However, Evergrande is still standing, at least for now. So let’s get up to speed on exactly where Evergrande is at with th…
MONACO'S BILLIONAIRES SECRETS EXPOSED!
Narrator: A tiny country smaller than Central Park that holds more billionaires per square mile than anywhere else on Earth, but today we’re not just talking about any billionaires; we’re going deeper into a world so exclusive that even money alone can’t …
After the Avalanche: Life as an Adventure Photographer With PTSD (Part 3) | Nat Geo Live
I went back to Africa this time. Exploration had taken on a different modality here. We were gonna explore the upper headwaters of the Okavongo, the Cuito river catchment that flows out of the Angolan highlands. Steve Boyes, another NG explorer, took us t…
Per capita GDP trends over past 70 years | Macroeconomics | Khan Academy
This is a chart from the New York Times that shows us how per capita GDP has trended on an inflation-adjusted basis since 1947. So you can really think about this as the post-World War II era. World War II, of course, ended in 1945. It’s always good to r…
Getting Vaccinated at the Coolest Place 😎
Good morning, internet! Today is a day I thought it would take many years to arrive, and never have I been happier to be wrong. Today is my COVID vaccination day, and I’m heading over to my appointment, which just so happens to be at the coolest place to …