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
Why Beautiful Things Make us Happy – Beauty Explained
A lot of things can be beautiful. Landscapes, faces, fine art, or epic architecture; stars in the sky. Or simply the reflection of the sun on an empty bottle. Beauty is nothing tangible; it only exists in our heads as a pleasant feeling. If we have to def…
We Are All Related
Hey, Vsauce, Michael here, and you guys are my family. Scientifically speaking, geneticists tell us that every single person on earth is, at the least, 50th cousins with everybody else on earth. It kind of has to be that way. Think of it like this—you ha…
Second derivatives | Advanced derivatives | AP Calculus AB | Khan Academy
Let’s say that Y is equal to 6 over x squared. What I want to do in this video is figure out what is the second derivative of Y with respect to X. If you’re wondering where this notation comes from for a second derivative, imagine if you started with you…
The Problem With Elon Musk
Uh, I mean, my mind is a storm. I don’t think most people would want to be me. They may think they would want to be me, but they don’t. They don’t know—is your storm a happy storm? No. I’ve grown tired of hearing the name Elon Musk and not really understa…
Kevin O'Leary on CNBC's Closing Bell
You speak to a lot of companies and really see businesses investing in all sorts of companies. What would you, how would you characterize the business environment right now when it comes to hiring, when it comes to expanding, adding jobs? I think there’s…
Exposing The Flaw In Our Phone System
This is Linus from Linus Tech Tips, and we hacked the phone network in order to spy on him. That’s pretty messed up, Derek. I slept easier not knowing that. We intercepted his phone calls and stole his two-factor passcodes. Is that your number, Linus? Yea…