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
Science Is the Engine That Pulls Humanity Forward
Welcome to the eponymous novel podcast. The main topic that we started out on was timeless principles of wealth creation, and then we’ve been touching a little bit on internal happiness and peace and well-being. But I am, first and foremost, a student of …
Signs of a Toxic Friend | Buddhist Philosophy
At some point in our lives, we begin to question our friendships. Some friendships have stood the test of time and can still be considered sources of mutual enjoyment and growth. But other friends do not seem to add any value to our lives. Or worse: they’…
The Reason I’m $1.8 Million In Debt
What’s up you guys? It’s Graham here. So, I really feel like this is something worth addressing given just how much misinformation there’s been surrounding a few of the recent videos that I made. Two of which really stand out the most. The first one is wh…
Introducing Khan Academy Learnstorm 2019!
Hello teachers, I’m Sal Khan, founder of the not-for-profit Khan Academy, and I’m here to announce a nationwide back-to-school learning challenge called LearnStorm. LearnStorm is an exciting way to jumpstart your school year around learning activities. I…
Most People Don't Know How Bikes Work
Most people don’t know how bicycles actually work. [Off screen] Let’s try it again. So we modified this bike to prove it. This video was sponsored by KiwiCo. More about them at the end of the show. When you’re riding a bike and you want to turn left, …
Acoustic Levitation in ULTRA SLOW MOTION - Smarter Every Day 134
Hey, it’s me Destin. Welcome back to Smarter Every Day. I am in Chicago. Anthony picked me up in his awesome Mustang and told me to come to this building because we’re gonna film acoustic levitation. What is this? This is an acoustic levitator. It’s si…