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
The Antibiotic Apocalypse Explained
What would you say if we told you that humanity is currently making a collaborative effort to engineer the perfect superbug? A bug that could kill hundreds of millions of people? Well, it is happening right now. We are in the process of creating a superba…
How to sell a $15,000,000 private jet!
Hey Steve, Daddy’s finally agreed to let me buy my first jet, but he’s only giving me a 15 million budget. 15 million? That’s not so bad! Let’s say you want an airplane, maybe 10 years old or so. All right, let’s see what you recommend. If we take $15 mi…
Introduction at Startup School NY 2014
Hi everybody. Ya’ll realize this is the first Startup School here in the amazing, one of a kind, unparalleled, New York City. It’s exciting! Yes. This is the city that made me. I’m from Brooklyn, anyone from Brooklyn here? [audience cheering] There’s some…
Hunting for Emeralds | Mine Hunters
Next morning, the teams start early on their first day’s work at Player Verie. “Oh look, here’s all the Timbers!” First up, Fred and Zach do an inventory of equipment at the site. “Hey, what’s this? It’s a blower! We can use this to ventilate the mine, …
Populations, communities, and ecosystems | Middle school biology | Khan Academy
In biology, it’s useful to have some shared language so we can communicate and describe the world around us in ways that we can all understand together. So here, we’re going to talk about populations, communities, and ecosystems, and as we’ll see, these …
"YOU WON'T BELIEVE YOUR EYES!" - Smarter Every Day 142
Hey, it’s me Destin. Welcome back to Smarter Every Day. You won’t believe your eyes. You’ve heard this before, right? It’s usually like a clickbait title to get you to watch an internet video or read a stupid article. But are there cases when you actually…