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
Spinning Sphere of Molten Sodium
Thermometry is kind of a key safety diagnostic to make sure that we’re well controlled. Thermometry, thermometry! What if it gets too high? Here in trouble! Or sodium expands when it heats, the vessel has a certain volume. There’s a temperature above whic…
8 Daily Habits That Changed My Life
What’s up, you guys? It’s Graham here. So, the new year is fast approaching. It’s almost going to be 2020, and for some reason, I still think that five years ago was 2010. But anyway, as we get closer to the new year, people begin creating their New Year…
Taoist Wisdom For Inner Peace
Taoism is an ancient Chinese mystical, philosophical, and religious tradition that emphasizes living in agreement with the Tao. The main work in Taoism is the Tao Te Ching, created by a mysterious author called Lao Tzu, which contains profound wisdom and …
Radiation vs Radioactive Atoms
Radiation has been in the news a lot lately, but the term “radiation” has just been thrown around loosely to mean anything potentially damaging coming away from a nuclear power plant. So, what are people worried about? That it’s going to, like, explode an…
The ACTUAL Day-In-The-Life of a Real Estate investor: The Good, Bad and Ugly
What’s up you guys? It’s Graham here. So, I’m here with none other than Matt McKeever, and we’ve got Jeff Whybeau in London, Ontario, Canada. I realized it looks like we’re about to drop a really hot mixtape, so we’re gonna call this mixtape “The Day in t…
Shark Tank Star's Secret Identity EXPOSED | Ask Mr. Wonderful #23 Kevin O'Leary & Daymond John
[Music] Oh [Music] [Music] Throughout that far [Music] Damon, we’ve been together on Shark Tank forever. What have you learned now after spending ten years on the show? What’s different now? What’s changed for you? The quality of the deals are much diffe…