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
Cheetah Matchmaking: Helping Big Cats Find A Mate | Expedition Raw
One two three great stuff! I’m a cheetah matchmaker. I actively manage a stud book for cheetah in 53 different reserves across the country. So, I effectively identify which cheetah are related to each other to swap individuals between these reserves to pr…
Supervenience
One of the questions was, “Um, how is it that logic supervenes on our brains?” And I think it’s a good question. Um, I think it’s a question that we’re not currently in a position to give a full answer to. Um, for that, our understanding of how the bra…
Differentiating polynomials example | Derivative rules | AP Calculus AB | Khan Academy
So I have the function f of X here, and we’re defining it using a polynomial expression. What I would like to do here is take the derivative of our function, which is essentially going to make us take a derivative of this polynomial expression, and we’re …
Exploring scale copies
We are told drag the sliders, and then they say which slider creates a scale copy of the shape, or which slider creates scale copies of the shape. So, let’s just see, explore this a little bit. Okay, that’s pretty neat! These sliders seem to change the s…
Trapped in Prostitution | Underworld, Inc.
Just a mile away, one prostitute works the internet from the comfort of her bedroom. The website is really helpful because I don’t always have to leave home, and it helps get my face out there. [Music] Annabella earns her living as an independent prosti…
Complex rotation
So now we’ve seen rotation by multiplying J by J over and over again, and we see that that’s rotation. Now let’s do it for the general idea of any complex number. So if I have a complex number, we’ll call it Z, and we’ll say it’s made of two parts: a rea…