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
trying to get my life together vlog | Med School Diaries
Oh, these fake sleeping scenes! Oh, let me pretend that I woke up right now. I’ve been feeling so… I’ve been feeling [Music]. No friends of mine, good morning! It’s actually currently 1 PM. Our professor canceled all of our lectures today, so I didn’t hav…
Ride Along With a Team of Lion Protectors | Expedition Raw
Right now, we’re looking for a group of lions that we heard were in the area. When we locate them, we want to pass this information on to the lion anti-snaring team so that they can come to the area, check it for snares, and prevent any lions from getting…
Curvature formula, part 2
In the last video, I started to talk about the formula for curvature. Just to remind everyone of where we are, you imagine that you have some kind of curve in, let’s say, two-dimensional space, just for the sake of being simple. Let’s say this curve is pa…
The encomienda system
Hi Kim. Hey Becca. So, what are we talking about today? Today, we’re going to be talking about how a racial hierarchy was established in the early Americas, about the encomienda system, the early Atlantic slave trade, and how such an arbitrary factor as …
Worked example: Balancing a simple redox equation | Chemical reactions | AP Chemistry | Khan Academy
So what we have here is a redox reaction. Things are getting oxidized and reduced; that’s the name, redox. But we want to balance this redox reaction, and when we talk about balancing a redox reaction, we want to make sure we conserve mass and charge on b…
Is Most Published Research Wrong?
In 2011, an article was published in the reputable “Journal of Personality and Social Psychology”. It was called “Feeling the Future: Experimental Evidence for Anomalous Retroactive Influences on Cognition and Affect,” or, in other words, proof that peopl…