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 Do We Laugh?
I was having dinner with two friends recently. They’re a couple, but as we sat down to eat, I could tell there was tension between them. They weren’t speaking to each other for the first 10 minutes of the meal and gave short answers to all my questions. A…
Her Cooking Offers a Taste of India to People Far From Home | Short Film Showcase
[Music] It’s a very humble thing that you put something very nice in somebody’s. Tell me, this is what I want to do in the morning: I want to create a dish with so many colors, and the flavor should be [Music] good. I’m her prit, so I cook for families w…
Comparing features of quadratic functions | Mathematics II | High School Math | Khan Academy
So we’re asked which function has the greater Y intercept. The Y intercept is the y-coordinate when X is equal to zero. So F of 0, when X is equal to zero, the function is equal to, let’s see, F of 0 is going to be equal to 0 - 0 + 4, is going to be equa…
Multiplying and dividing decimals by 10, 100, 1000
In this video, we’re gonna get a little bit of practice multiplying and dividing decimals by ten, hundred, and a thousand. So let’s just start with a little bit of a warm-up. If I were to say, “What is two point zero five times ten?” Pause this video and …
Sex on Wheels | Original Sin: Sex
[Music] Another 20th century triumph of technology was quickly co-opted for sex. Weighing in at a ton or more, it became one of the all-time biggest fetish objects. “Gee, this is a beautiful car, Chevrolet 1956. Nice! The car industry should be my part…
We Made Face Shields - Smarter Every Day 233
Hey! It’s me, Destin. Welcome back to Smarter Every Day. I’m alone, so I can take this off. I am in a warehouse that was once used to work on the Saturn V rocket, and we have just spent the whole day tooling up a line to disinfect and sanitize 3D printed …