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
For this week's National Financial Awareness Day...
Man, bro, let me tell you what had went down, and I was two beds away from getting bro whole Barbershop, bro. Yeah, oh my mama, bro, peanut gonna call my phone talking about I just got paid. I looked at the phone, “You just got paid? What, man? What the d…
Calculus based justification for function increasing | AP Calculus AB | Khan Academy
We are told the differentiable function h and its derivative h prime are graphed, and you can see it here. h is in blue, and then its derivative h prime is in this orange color. Four students were asked to give an appropriate calculus-based justification …
Verifying inverse functions from tables | Precalculus | Khan Academy
We’re told the following tables give all of the input-output pairs for the functions s and t. So we see this first table here, we have some x’s, and then they tell us what the corresponding s of x is. Then, in this table, we have some x’s, and they tell u…
Your Social Security Card is Insecure
Americans love their independence… a nation of pioneers living out from under the eye of government … (except for all the government). As such, unlike many other countries, Americans don’t have a national ID card… and even the idea of creating one is a po…
Mr. Freeman, part 49
I constantly hear - Freeman, what should we do? Give us a sign! Make a revolution! We will follow you! Aaah… You know all the answers to all of your questions, but you like it so much to pose as gifted with naivety girls… All right, I’ll retrieve the ans…
Limits at infinity using algebra | Limits | Differential Calculus | Khan Academy
Let’s think about the limit of the square root of 100 plus x minus the square root of x as x approaches infinity. I encourage you to pause this video and try to figure this out on your own. So, I’m assuming you’ve had a go at it. First, let’s just try to…