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
Seagrass and the Ecosystem | When Sharks Attack
In 2019, the North Carolina coastline is in the grip of a disturbing string of shark attacks. Two different species, bowls and black tips, have attacked four swimmers in little more than six weeks. The cause is a mystery. The final piece of the puzzle mig…
_-substitution: defining _ | AP Calculus AB | Khan Academy
What we’re going to do in this video is give ourselves some practice in the first step of u substitution, which is often the most difficult for those who are first learning it. That’s recognizing when u substitution is appropriate and then defining an app…
Why Being Busy is Ruining Your Life
Hey, it’s Joey. What could be better ideas? So, a lot of people think being busy is a good thing, as if picking up pieces of paper and putting them back down again, writing emails, and, you know, walking around checking your watch, and basically just havi…
Meet The $700,000,000 Man Who Lost Everything | Dave Ramsey
I’m an entrepreneur. This is going to work. It didn’t. It didn’t. It didn’t. It didn’t. It didn’t. And then you put something out there that you kind of thought, “Yeah,” and then it goes big and you got, “Crap, I don’t know nothing.” You know, so you just…
Charlie Munger on Why Are People So Unhappy? | Daily Journal 2022 【YAPSS Highlight】
Speaker: What worries you most about our economy and the stock market, and on the other hand what makes you optimistic? Well, you have to be optimistic about the competency of our technical civilization. But there again, it’s an interesting thing if you t…
Flora, Fauna, Funga | Documentary | National Geographic Society
(Tranquil music) (Birds chirping) - [Giuliana] Without fungi, no plant could live outside of water. Without fungi, nothing would decompose. (Tranquil music continues) (Birds chirping) Most of the fluxes of nutrients on our planet would not exist. Basicall…