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
15 Steps to Force Your Way Out of Poverty
Hello, alexers. Welcome back to a special multi-part series that we’re going to be doing on the financial journey of going from poverty to wealth. Do not skip this intro; this is going to be an honest conversation focused on the fundamentals. The things y…
Identifying a sample and population | Study design | AP Statistics | Khan Academy
Administrators at Riverview High School surveyed a random sample of 100 of their seniors to see how they felt about the lunch offerings at the school’s cafeteria. So, you have all of the seniors; I’m assuming there’s more than a hundred of them. Then the…
THE FED JUST RESET THE MARKET | Major Changes Explained
What’s up guys, it’s Graham here and, uh, welp, it just happened. The Federal Reserve completely just shocked the market right now with the 75 basis point rate hike, setting off yet another chain reaction that’s about to impact the entire market at the co…
$20,000,000 private jet tour
If you have $20 million, this is one of the best planes you can get. This is the Pror 500. Steve, should we take a look inside? Sure, let’s go. We’re here on the Pror 500, one of Ember’s latest and greatest new aircraft. Steve, how is this different fr…
Can Our Universe Destroy Itself? #shorts
Can our universe destroy itself? Everything in the universe strives to be in the most stable state possible. For example, a ball on top of a hill is in an unstable state. When pushed, it will roll downhill, lose its potential energy, and end up in a stabl…
Product and Media Are New Leverage
The most interesting and the most important form of leverage is this idea of products that have no marginal cost of replication. This is the new form of leverage. This was only invented in the last few hundred years. It got started with the printing press…