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
How To NOT Get Screwed As A Software Engineer
Funniest thing is this: one of the technical persons who does all the work is the one actually reading the analytics. They’re like, “Hey, like this, our launch bombed, what’s the plan?” And the reply is, “Don’t worry about it, this is like you need to be …
Solubility and intermolecular forces | AP Chemistry | Khan Academy
In this video, we’re going to talk about solubility, which is just a way of describing how well certain solutes can dissolve in certain solvents. Just as an example, we could go to our old friend sodium chloride and think about why it dissolves well in wa…
Bill Belichick & Ray Dalio on Toughness: Part 2
Um, there’s a toughness to run into, you know, two or three guys that outweighing by a hundred pounds or so. At the line of scrimmage, knowing that they got to fight for that extra yard, half yard, whatever it is to get a first down. So, um, then there’s…
Will Mars Be a World Without Laws? | MARS
Law works because it’s effectively backed up by a state, and that kind of breaks down in space a little bit. The whole legality of who owns what is going to fill volumes. There are international treaties that relate to space. The UN Outer Space Treaty 196…
Examples recognizing transformations
What we’re going to do in this video is get some practice identifying some transformations. The transformations we’re going to look at are things like rotations, where you are spinning something around a point. We’re going to look at translations, where y…
Everything Wrong With The NEW X1 Credit Card
What’s up guys? It’s Graham here. So, okay fine, I get it. You guys have been sending me so many comments, DMs, emails, and even more comments asking me to review the Smart X1 credit card. So, if this finally makes everyone happy, then sure, we’re going …