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
Boveri-Sutton Chromosome Theory
Let’s give ourselves a reminder of how important Gregor Mendel’s work was. In 1866, he published his findings, and it’s important to realize it wasn’t like immediately in 1866 or 1867 the whole world changed and everyone said, “Oh, Gregor Mendel figured i…
The Crux Episode 3 | Full Episode | National Geographic
I was climbing so well and I was, like, in such a good position to get really good score. And I just was like, now I’m going to fall off like, that was perfectly average. You know, **** my life. Everyone wants to win. For the athletes that have lost the W…
Levels of Wealth (Car Edition)
Your car tells the world how well you’re doing in life. So in this video, we’ll break down what different levels of wealth drive around. Let’s see how high of a level you’ve made it to. Here are levels of wealth: the car edition. Welcome to Alux, the plac…
Warren Buffett: The Upcoming Stock Market Crash (Warren Buffett Indicator)
It’s no secret that stock prices are at all-time highs. This has people asking the literally trillion-dollar question: Are we in a stock market bubble? According to what is referred to as the Warren Buffett indicator, the answer to that question is a reso…
How to Become the World’s First Trillionaire
Today’s guest episode is voiced by Emico, a talented scriptwriter who has been working with Aperture for over two years now. In 2018, Apple became the world’s first trillion-dollar company. To this day, there are just five companies in the world worth ov…
A path to ending systemic racism from Bill Lewis, former NAACP LDF co-chair | Homeroom with Sal
Hi everyone, welcome to the daily homeroom live stream. We’re doing it a little bit earlier than normal, uh, because we have a guest that we really wanted to talk to who was available a little earlier than normal. First of all, for those of you wondering…