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
What Will We Miss?
Hey, Vsauce. Michael here. And the year 6009 will be the very first year since 1961 that a year, when written in Hindu-Arabic numerals, can be inverted and still look the same. But you and I probably won’t live long enough to enjoy the year six thousand a…
Why Warren Buffett is Selling BILLIONS in Stock
The best way to learn about investing is to follow what great investors are doing in their own stock portfolios, and the number one investor you should be following is none other than the legend himself, Warren Buffett. Following Buffett’s stock portfolio…
Conceptual overview of light dependent reactions
We’ve seen in previous videos that photosynthesis can be broken down into the light dependent reactions and the Calvin cycle. The light dependent reactions is where we take light as an input along with water, and we’ll see the water is actually a source o…
The Fermi Paradox — Where Are All The Aliens? (1/2)
Are we the only living things in the entire universe? The observable universe is about 90 billion light years in diameter. There are at least 100 billion galaxies, each with 100 to 1,000 billion stars. Recently, we’ve learned that planets are very common …
Worked examples: Punnett squares | Inheritance and variation | Middle school biology | Khan Academy
We’re told that in a population of pea plants, some plants have round seeds and others have wrinkled seeds. The gene for seed shape in this population has two possible alleles. Remember, alleles are just versions of the gene. One allele, or one version, i…
How to Fix a Leaky Wooden Boat | Primal Survivor
NARRATOR: The boats may look simple, but their design is intricate and complex. Ta’u boatbuilders journey deep into the forest– [non-english speech] –to find the 11 different species of tree needed to make a [non-english]. Centuries of experience go into …