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
Chad Rigetti at Startup School SV 2016
Everybody, our next speaker is Chad Retti from Retti Quantum Computing. Retti Quantum Computing went through YC in the summer of 2014. Um, at that point they had nothing. Uh, they are now one of the leading Quantum Computing companies in the world. And ne…
The Eighth Amendment | The National Constitution Center | US government and civics | Khan Academy
Hi, this is Kim from Khan Academy. Today, I’m learning about the Eighth Amendment to the U.S. Constitution, which prohibits the government from imposing excessive fines and bail or inflicting cruel and unusual punishment on individuals accused or convicte…
Dilating points example
We’re asked to plot the image of point A under a dilation about point P with a scale factor of three. So, what they’re saying when they say under a dilation is they’re saying stretching it or scaling it up or down around the point P. That’s what we’re go…
You Can't Win Until You Overcome These Obstacles
It’s just a matter of time until you have to overcome these, so you might as well get ready. Here are 15 obstacles you will be facing in life. Welcome to alux.com, the place where future billionaires come to get inspired. Number one: your parents’ limite…
Get to Know the Gorillas of Disney's Animal Kingdom | Magic of Disney's Animal Kingdom
On the Gorilla Falls Exploration Trail lives a very special resident. This is our family troupe of gorillas. They’re a big group; all of our kids were born here. So we have Lily, she’s our oldest. She’s 12. There she is. Lily is probably my favorite. She…
THE FED JUST FLIPPED THE MARKET | Urgent Changes Explained
What’s up, Graham? It’s guys here! So, you know the saying that riches are made in recessions? Well, even though housing data fell to its lowest level ever, tech layoffs are getting more and more common, and the price for oil keeps going higher. Brand ne…