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
Where to BUY Uranium and other DONGS!
Hey, Vsauce. Michael here. And over the weekend, I was in Los Angeles, where I got to meet up with Henry, the creator of MinutePhysics. But let’s get to some DONGS. MinutePhysics recommended Grow Cube. You win by selecting the elements in the correct ord…
The Rich Culture of Nelson Tasman | National Geographic
New Zealand’s Nelson Tasman region is the home of sunny beaches, outrageous landscapes and Nelson, a small city that boasts a thriving art scene, craft breweries and wineries, and a farmer’s market famed for its local specialties. National Geographic sent…
How to Think Clearly | The Philosophy of Marcus Aurelius
Almost everyone thinks they are a good thinker, but in reality, few people really are. A truly great thinker is constantly growing and evolving, so take a look around you: how many people do you see moving forward in life? How many people do you see solvi…
I am making Axe Ghost
Hey, my name’s Thomas. This is unusual content for this channel. I realize I’ve been working on this video game called Ax Ghost. Just recently, I’ve published a demo of it on Steam, and I’m just going to play it here—play the current build—and let you see…
Normative and positive statements | Basic economics concepts | AP Macroeconomics | Khan Academy
What we’re going to do in this video is discuss the difference between normative statements and positive statements, and you’ll see these words used usually in an economic context, sometimes a philosophical one. A normative statement is one that really i…
How to keep your online accounts secure
Hi everyone, Sal Khan here, and I’m here with Guemmy Kim, who’s a director of product management at Google in account security. And my question for you, Guemmy, is everyone’s always talking about account security. Why should I or the folks watching care…