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
The Beginner's Guide To Stoic Travel
When studying the ancient scriptures, we discover a love-hate relationship between the Stoics and travel. So, is there a Stoic way to travel? And how can Stoicism benefit those who engage in traveling? In this video, I want to present you the beginner’s g…
He’s Watching This Glacier Melt Before His Eyes | Short Film Showcase
For [Music] [Music], my name is Rick Brown. I’m the owner of Venture 60 North Adventure Center in Seward, Alaska. I’ve been guiding here since the early 90s. I’ve lived here permanently since 2003 and have been guiding in the glaciers all that time. Norm…
Simplifying rational expressions: two variables | High School Math | Khan Academy
Let’s see if we can simplify this expression, and like always, pause the video and have a go at it. Now, this one is interesting because it involves two variables, but it’s really the same ideas that we’ve done when we factored things with one variable. …
DEEP DIVE #1 - Smarter Every Day 52
Hey, it’s me Destin. Welcome back to Smarter Every Day. So today, I’m laying tile in my house, and in order to do so, I have to make all these intricate cuts to lay the proper foundation. Now, it’s pretty challenging, but many people have done this over …
Carl Sagan Tried To Warn You
Flowers are blooming in Antarctica. There are two species of flowering plants on the continent: the Antarctic hairgrass and the Antarctic Pearl wart, and they’re both growing at a much faster rate than ever before. In a study published by the University o…
Logistic growth versus exponential growth | Ecology | AP Biology | Khan Academy
Let’s now think a little bit more about how we might model population growth. As we do so, we’re going to become a little bit more familiar with the types of formulas that you might see in AP Biology formula sheet. In a previous video, we introduced the …