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
Warren Buffett: How Most People Should Invest
[Music] So Warren Buffett, we know he is the world’s best investor, and he has built his fortune by analyzing individual businesses and buying them at discounted prices. His strategy can essentially be summarized by just waiting and waiting and waiting un…
Time to Sell Stocks and Take Profits?
Hey guys, welcome back to the channel. In the last video, we were talking all about how expensive the market has gotten based on the turnaround that we’ve seen the last few months, and actually how far detached the market is from the economic reality that…
Co-Founder Equity Mistakes to Avoid | Startup School
[Music] Hello, I’m Michael Cybal, and today I’m going to talk about co-founder equity splits and co-founder breakups. To be clear, we want people who are building tech software startups that they expect to be VC funded. You know, this is advice for you. …
Writing geometric series in sigma notation
So we have a sum here of 2 plus 6 plus 18 plus 54, and we could obviously just evaluate it, add up these numbers. But what I want to do is I want to use it as practice for rewriting a series like this using sigma notation. So let’s just think about what’…
When Family Secrets (And Soap Operas) Fuel Creativity | Podcast | Overheard at National Geographic
I think when I think about my childhood, it feels split. There’s my childhood in Moscow and my childhood in Armenia, which came at the time of the collapse of the Soviet Union. So my first memory is of us standing in breadlines. My second memory is of us …
Vultures - Photographing the Antiheroes of Our Ecosystems | Exposure
They are disgustingly ugly. They are the ultimate anti-hero, and something about that draws me to them in some sort of weird, morbid fascination. Actually, as I got to know them, and started researching them, and started to understand them more, I discove…