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
This Guy Is Making Furniture and Buildings out of Your Trash | Nat Geo Live
[Arthur] I hate plastic. That’s why we’ve engulfed on a 15 year mission to turn that into something that we actually want. We have collected around 750 new materials that’s coming from our daily post-consumer waste. It can go into any consumer product a…
Example translating points
What we’re going to do in this video is look at all of the ways of describing how to translate a point and then to actually translate that point on our coordinate plane. So, for example, they say plot the image of point P under a translation by five unit…
What The Midterm Elections Will Mean For Investors | Meet Kevin
[Music] [Applause] [Music] What about Keystone Pipeline? Should Biden have kept that going? It would have been the fourth phase of it. We’ve got the other three. Do we really need it? Any changes expected? Yeah, I think it’s clear now that the market thi…
Visual understanding of regrouping decimals
What we’re going to do in this video is explore place value involving decimals, and in particular, we’re going to think about how you can regroup value from one place to another. This is going to be very useful later in your life when you start doing some…
Pristine Seas: The Global Expedition Launches in the Pacific | National Geographic Society
The global Expedition is kicking off with our own purpose modified vessel, the MV Argo. This is the largest marine conservation effort ever attempted to protect the world’s ocean, starting in the Pacific. [Music] Life on Earth wouldn’t exist without hea…
why Japanese people are so healthy and long living? 🇯🇵
The average life expectancy in Japan is 84 years according to the OECD. Japanese women can expect to live to the age of 87, 6 years more than their counterparts in the U.S. Japanese men can expect to live to 81, five years more than their American peers. …