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
The Parker Solar Probe - Smarter Every Day 198
Have you ever figured something else, and you tried to explain it to someone else and they just didn’t believe you? This is the story about a man named Eugene Parker who, in 1958, wrote a paper about solar winds. NASA has named about 20 spacecraft after d…
Charlie Munger is selling Alibaba!
If you’ve been following this channel for any amount of time, you know I’m a big believer that one of the best ways to learn about investing is to follow the portfolios of well-respected investors. Whether you are just starting out on your investing journ…
Why War Zones Need Science | Podcast | Overheard at National Geographic
So you can see a skull very clearly up there, and actually, if you look closely, you can see there’s a number of other bones: long bones, bones of the foot. So, a whole pile of bones here. This is Ella Al-Shamahi; she’s standing on a rocky hillside next t…
What's The Most Dangerous Place on Earth?
Hey, Vsauce. Michael here. 93% of all the humans who have ever lived are dead. For every person alive right now, there are 15 people who are no longer alive. The Earth is dangerous… but where is the most dangerous place on Earth? Ignoring freak occurrenc…
Rare 1920s Footage: All-Black Towns Living the American Dream | National Geographic
And Oklahoma is a unique space in terms of the number of African-American towns that were established. Some suggest upwards of 50 African-American towns between 1924 and 1928. Reverend S.S. Jones was going around documenting this sort of self-determined, …
Dividing by a two digit number
In this video, we’re going to get a little bit of practice dividing by a two-digit number. So let’s say that we have 4781 divided by 32. Pause this video and see if you can figure out what that’s going to be and if there is a remainder, figure out what th…