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
How to Get Rich Without Getting Lucky (Naval Ravikant)
So what if I told you there was an instruction manual on how to get rich in today’s economy? Would you want to know what that instruction manual consisted of? Believe it or not, this actually exists, and we’re going to go through it all in today’s video. …
Courage | The Art of Facing Fear
Sometimes even to live is an act of courage. Seneca. Is kicking your enemy into a large well after screaming “This is Sparta” the Hellenistic embodiment of courage? Well, it could be, looking at the Greek mythological heroes like Achilles and Hector, and …
Rewilding Gorongosa: Lions | National Geographic
Everyone comes to a national park in Africa and they want to see lions. They are among the most incredible species I’ve ever worked with. [Music] My name is Paula Boule. I’m a National Geographic explorer and associate director of lion conservation for Go…
Inflection points from graphs of function & derivatives | AP Calculus AB | Khan Academy
What we’re going to do in this video is try to get a graphical appreciation for inflection points, which we also cover in some detail in other videos. So the first thing to appreciate is an inflection point is a point on our graph where our slope goes fr…
You Are Enough
“I used to think the worst thing in life was to end up all alone. It’s not. The worst thing in life is to end up with people that make you feel all alone.” Robin Williams Codependency is a potentially destructive state to be in. At its core, it means th…
STOCK MARKET HITS ALL TIME HIGHS - TIME TO SELL!!
What’s up you guys, it’s Graham here. So we’ve seen it again: stocks have just hit all-time highs. But the real question remains, how high can this go? And also, should we just sell it all? I feel like so many people are sitting on the edge of their seat,…