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
Looking for Killer Whales 26 Years After the Exxon Valdez Oil Spill (Part 1) | National Geographic
In 1989, the largest oil spill in US history destroyed a remote Alaskan wilderness. That was a long time ago. Most people say the sound is back to normal, except for this man. He’s been studying killer whales caught up in the spill. He believes they’re st…
Why most New Year's Resolutions fail
[Applause] As autumn settles in, leaves fall from the trees, and another growing season ends with the harvest. This might not have been a great year for crops, but winter will destroy the evidence of last year’s efforts and present a new opportunity for g…
living alone ☕️ | a productive day in Rome 🇮🇹 exploring the city, eating yummy food 🍝
[Music] Further [Music] Um [Music] Okay, so good morning everyone! Today we’re gonna spend a productive day together because I have a lot of things to do. So, I’m currently living alone in Rome, but my mom is visiting me. I have a video that I need to edi…
PEOPLE WON'T WORK IN WAR-TORN CITIES
The economies change radically. The problem with saying everybody has to work in the office is you won’t be able to hire the best talent. When we went out for financial services people in our operating company, the best talent told us, “If I have to come …
Let’s Travel to The Most Extreme Place in The Universe
The universe is pretty big and very strange. Hundreds of billions of galaxies with sextillions of stars and planets, and in the middle of it all there is Earth, with you and us. But as enormous as the universe seems looking up, it seems to get even large…
Ordering rational numbers compared to an average | Grade 8 (TX) | Khan Academy
We’re told four friends completed a 5 km run. Their average time to complete the run was 24 minutes. To compare their times, they created a table that shows the difference between each person’s time and the average time, with negative numbers representing…