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
Summarizing nonfiction | Reading | Khan Academy
Hello readers. Today I’m going to be talking about the skill of summary, which you might be familiar with in the form of summarizing stories. It’s like a retelling, but shorter and in your own words. This is an important skill – summarizing fiction – but …
Overview of the Middle Ages | World History | Khan Academy
Growing up, we all have impressions of the Middle Ages. We read about knights in shining armor, castles with moats, and towers. But when were the Middle Ages? The simple answer: the Middle Ages in Europe are the roughly 1,000 years from the fall of the Ro…
Kevin O'Leary's Watch Collection Journey | Kitco News
[Music] You’re probably one of the most diversified investors that I’ve had the privilege of speaking to. You’ve got stocks, cryptocurrencies, gold, venture capital from your Shark Tank deals, and of course, you’ve got watches. Let’s talk about your perso…
Coordinate plane relationships
We’re told Jazella plots the ordered pair (4, 3) on a coordinate grid by moving four units to the right and three units down from the origin. Which statement is true? So pause this video and have a go at this before we do this together. All right, now be…
DON’T HOLD CASH: Use THIS Instead
What’s up you guys, it’s Graham here. So, this is one of the few videos out there that literally applies to everybody watching. That’s right, even you! The reason why is because if you have any amount of cash whatsoever, most likely you’re losing money w…
Searching For Life in Volcanoes and Other Extreme Environments | Nat Geo Live
JEFFREY MARLOW: As a scientist, we often go to some of the most extreme places on our planet to collect microbes, bring ‘em back, understand what they’re doing and how they work. These types of organisms can actually broaden our search for life beyond ear…