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
Answering Google's Most Asked Questions of 2022
For most of Google’s relatively short existence, we’ve searched small, silly, insignificant questions - things like how to tell if a papaya is ripe. The color is almost fully yellow, and the feeling is slightly soft. Don’t forget to scoop out the seeds! S…
The 5 Financial Goals To Achieve In Your 20s
What’s up you guys, it’s Graham here. So, I have no idea how to start this video other than to say that I went down a bit of a rabbit hole the other day. You know, like when you come across something online and then for some reason, you open up another ta…
Ancient history and the Old Testament | World History | Khan Academy
[Instructor] In the next few videos, we’re gonna do a very high-level overview of ancient history. We’re literally going to try to cover 3,000 years of history in a handful of videos. And we’re going to focus on not all of the history in the world, and it…
Homeroom with Sal & David C. Banks - Thursday, September 10
Hi everyone, welcome to our homeroom live stream. Sal here from Khan Academy. Really excited about the conversation we’re about to have with David Banks, who is really one of the leading educators in the country, president of the Eagle Academy Foundation.…
Wait, so is the U.S. in a Recession?
GDP, gross domestic product, explained by the Bureau of Economic Analysis, is a comprehensive measure of U.S. economic activity. Now, you might have heard GDP pop up in the news lately because in America, their GDP is currently shrinking. In Q1, U.S. GDP …
Subtracting rational expressions: unlike denominators | High School Math | Khan Academy
So right over here we have one rational expression being subtracted from another rational expression. I encourage you to pause the video and see what this would result in, so actually do the subtraction. Alright, now let’s do this together. If we’re subt…