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
A Survivor's Story as a Guide at Rwanda's Genocide Memorial | Short Film Showcase
I would say like more than majority of the people, they are very smart. It’s a great pleasure you welcome to Kar Genocide Memorial. My name is Gamba. I’m the head guide of the place we’re visiting. The tour starts by laying the leaf of flowers as a sign o…
Article I of the Constitution | US Government and Politics | Khan Academy
Hey, this is Kim from Khan Academy, and today I’m learning about Article One of the U.S. Constitution. Article One is jam-packed with information about how our government is supposed to work. But principally, what it does is create the legislative branch …
Divergence intuition, part 2
Hey everyone! So, in the last video, I was talking about Divergence and kind of laying down the intuition that we need for it. You’re imagining a vector field as representing some kind of fluid flow where particles move according to the vector that they’r…
Why Do We Dream?
Hey, Vsauce. Michael here, and today we are going to talk about why we dream. What’s going on inside our brains? The scientific study of dreaming is called Anaya ology, and for most of history, it didn’t really exist. Because you can’t hold a dream, it’s…
Why Don't We All Have Cancer?
Hey, Vsauce. Michael here. Since this video began, more than a million of your cells have died. It’s natural, don’t worry. But you are literally covered with death. Dead stuff. Fingernails, your hair, the outermost layer of your skin - all made out of dea…
Compare decimals word problems
Al is comparing two recipes for homemade bread. The recipe for white bread calls for 4⁄10 of a kilogram of flour. The recipe for whole wheat bread calls for 0.385 kilograms of flour. Which bread takes less flour? So, the white bread calls for 4⁄10 of a …