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 More You Try, The Worse You Feel | On Mood Swings
Wise people of the past have emphasized the impermanence of things. Consider Marcus Aurelius, repeatedly contemplating the transience of everything and how we all eventually fall away in the face of death. Or how Lao Tzu mentioned that a violent wind does…
LEGO TACO! And Other Great Images -- IMG! Episode #47
Do you consider yourself a fan of dogs? Or cloud ice cream? Well, it’s episode 47 of IMG! This is a mirror and this is clear glass. A broccoli tree house and, with the right outline, Europe can be a dragon. In the early 1900s, Arthur S. Mole and John D. …
What you should know about microfinance
I want to tell you about micro finance because you might want to either donate to it or get some money from it. I especially want to tell you about Gine America, which is a micro finance bank that I support the most. Micro finance is small loans to people…
How I bought a Tesla for $78 Per Month
I just bought the $35,000 Tesla Model 3, and just like any 28-year-old millennial adieu, I ordered it online without ever having seen it and without ever having driven one before. Here’s what happened: I was browsing YouTube and happened to come across a…
Separate Boys From Men | Wicked Tuna: Outer Banks
It’s untie and get out of here. Oh yeah, slow right down, Tyler. You’re gonna snap your welds right off. Yeah, getting everything ready now. We’re not done. Yeah, our green stick is so tall we have to lower it to get underneath the bridge, but now we’r…
The $3 Trillion Private Equity Bubble is Finally Bursting
There’s been a lot of talk about how the U.S. real estate market is in a bubble, but people are getting it wrong. The real bubble is in a little corner of the finance industry that is unknown to the average person. This industry has trillions of dollars i…