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
Michael Burry Just SHORTED Tesla Stock!
[Music] Hey guys, welcome back to the channel! Got an exciting bit of news to talk about today. Um, controversial, definitely controversial. Michael Burry is shorting Tesla stock. So, Michael Burry, you guys probably know him from “The Big Short.” He’s …
Centripetal force | Physics | Khan Academy
You may have seen astronauts floating in the space station. Is it because there’s no gravity? No, there is gravity because it’s very close to Earth. Then why are they floating? Well, turns out that they are not floating. In fact, the whole space station i…
The Gray Rock Method | Beat ‘Toxic People’ with Serenity
Some people really get in our hair. Moreover, there are individuals that, for some reason, take delight in getting emotional reactions out of others. When they succeed, they win, and their ability to hurt gives them a sense of power. Whether we call them …
Probability with combinations example: choosing groups | Probability & combinatorics
We’re told that Kyra works on a team of 13 total people. Her manager is randomly selecting three members from her team to represent the company at a conference. What is the probability that Kyra is chosen for the conference? Pause this video and see if yo…
The Best Decisions You Can Make In Life
During the course of your life, you’ll be faced with some decisions that will completely change the way you experience what time you have on this planet. Even though most decisions are reversible, they will still have a great impact on your life. These ar…
Preparing for Mules | Live Free or Die
In the wilderness, economy doesn’t exist. The only economy we have is an economy of motion. I have no electricity, no running water. If the world came to an end, I could totally take care of myself. My blacksmithing puts food on the table; it’s my main me…