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 Many Calories are on a Smudgy Screen?
Hey, Vsauce. Michael here. And I’m home for the holidays. I’m in my parents’ basement, using a different camera than usual. But you know what is always different? Fingerprints. The palms of our hands and the soles of our feet are weird. They are covered w…
Vector form of multivariable quadratic approximation
Okay, so we are finally ready to express the quadratic approximation of a multivariable function in vector form. So, I have the whole thing written out here where ( f ) is the function that we are trying to approximate. ( X_0 ) and ( Y_K ) is the constant…
What are some things you’ve had to unlearn?
You’d be surprised at how many Founders that we talked to will tell you that nothing they did in their job translates at all to their startup. It’s because you have so much infrastructure inside of Google or Facebook to do your job, and they have their ow…
Warrior Watch: Protecting Kenya's Lions | Explorers in the Field
[Music] [Music] My father was Saawariya and they used to kill many, many, many Lancia. He used to tell me how dangerous Lancer. I used to hate Lance. [Music] When I was a young boy, I thought I would be growing up and killing Lance, but now we protect the…
Warren Buffett: "Rule #1: Never lose money. Rule #2: Never forget rule #1."
Warren Buffett: The first rule of investment is: Don’t lose. And the second rule of investment is: Don’t forget the first rule. And that’s all the rules there are. I mean, if you buy things for far below what they’re worth, and you buy a group of them, yo…
Common chain rule misunderstandings | Derivative rules | AP Calculus AB | Khan Academy
We’re going to do in this video is focus on key misunderstandings that folks often have, and we actually got these misunderstandings from the folks who write the AP exams from the actual College Board. So, let’s say that we are trying to take the derivat…