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
How Much I Make With 3 Million Subscribers
What’s up you guys! It’s Graham here. So I’m sure at some point you’ve been scrolling YouTube. You come across your favorite creator, and then you start to think to yourself, “How much money are they making?” No? Just me? Alrighty then! I’ll end the vide…
Festival Flip! | Epcot Becoming Episode 5 | National Geographic
Festivals at EPCOT are in the DNA of the park. It’s truly the transformation of the park through those festival seasons that keep guests coming back. EPCOT festivals have continued to evolve since starting back in 1994 with the EPCOT International Flower …
What Shutting Down Your Startup Feels Like - Avni Patel Thompson of Poppy with Kat Manalac
Cat, you haven’t been on the podcast in a while. Why don’t you introduce yourself before we talk about Omni for an hour? Well, so I’m Captain Alec. I’m one of the partners at YC. I work a lot on outreach to applicants, so everything we do with an externa…
3 Reasons Why Nuclear Energy Is Awesome! 3/3
Three reasons why we should continue using nuclear energy. One: nuclear energy saves lives. In 2013, a study conducted by NASA found that nuclear energy has prevented around 1.8 million deaths. Even if you include the death tolls from Chernobyl and Fukus…
Different mediums and the tone of the text | Reading | Khan Academy
Hello readers. I would like to show you one of my favorite things I ever wrote. It’s this splash page from a comic I wrote some years ago, illustrated by my friend Core Biladu. You’ll notice it has almost no words in it, at least in this form. Now, let m…
The Stock Market is a Ponzi Scheme. Fully explained.
When we think about the stock market, we think about money, the finance industry, businesses, and making money from investing in successful businesses. The belief is investing in successful businesses is what leads to investment profits, and there’s a dir…