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
Identifying graph for exponential
All right, we are asked to choose the graph of the function, and the function is f of x equal to 2 * 3^x. We have three choices here, so pause this video and see if you can determine which of these three graphs actually is the graph of f of x. All right,…
Safari Live - Day 308 | National Geographic
This program features live coverage of an African safari and may include animal kills and caucuses. Viewer discretion is advised. Good afternoon everybody! Welcome to drama in the Sabi Sands, where it is 34 degrees Celsius. That’s about 87 Fahrenheit. I …
Vector form of the multivariable chain rule
So, in the last couple of videos, I talked about the multi-variable chain rule, which I have written up here. If you haven’t seen those, go take a look. Here, I want to write it out in vector notation, and this helps us generalize it a little bit when the…
Geometric series introduction | Algebra 2 | Khan Academy
In this video, we’re going to study geometric series. To understand that, I’m going to construct a little bit of a table to understand how our money could grow if we keep depositing, let’s say, a thousand dollars a year in a bank account. So, let’s say t…
Warren Buffett: How to Make Money During Inflation
Are you seeing signs of inflation beginning to increase? We’re seeing very substantial inflation. It’s very interesting. I mean, we’re raising prices, people are raising prices to us; it’s being accepted. I mean, inflation is a big concern for everyone ri…
Tuscaloosa Tornado - Smarter Every Day 7
[Music] [Applause] Hey, it’s me, Destin. Tuscaloosa recently got rocked by a tornado real bad. National Guards in the street, power guys are working hard trying to get power back on, and of course, media, it’s bad. So, my sister was in Tuscaloosa when al…