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
HOW TO GET 1000 SUBSCRIBERS ON YOUTUBE IN 2022
What’s up you guys? It’s great I’m here! So really quick, before I get into the video, is really fun YouTube experiment. Hit the like button and comment anything down below for the almighty YouTube algorithm. The reason for this is because from all the r…
Worked example: rational vs. irrational expressions (unknowns) | High School Math | Khan Academy
We’re told let A and B be rational numbers and let B be non-zero. They had to say let B be non-zero because we’re about to divide by B. Is A over B rational or irrational? Well, let’s think about it. They’re both rational numbers, so that means that A, s…
Ratio example problems
Let’s do some example questions dealing with ratios. So we’re told the table shows the number of people waiting in line for different rides at an amusement park. So, 15 people are waiting in line for the roller coaster, four people for the slingshot, 12 …
Discretionary and rulemaking authority of the federal bureaucracy | Khan Academy
In many videos, we have talked about how a bill can become a law. It first gets introduced into the legislative branch, which in the United States is the U.S. Congress at the federal level. If it passes both houses of Congress, then the bill will go to th…
Why Self-Discipline is so Hard
This is Odin, also known as the All-father. He will become the wisest and most powerful of the Norse gods, but not yet. For now, he hangs from Yggdrasil, the world tree that holds all nine worlds together, with a spear lodged in his chest. He will hang th…
15 Pieces Of Advice Only Weak People Give You
Hello elixirs and welcome back. At some point in life, we all need advice to solve one problem or the other, and we might need it for us to take a bold step, probably on our career path or things that mean more to us. In today’s video, we’ll be checking …