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
BIGGEST EXPLOSIONS
Hey, Vsauce. Michael here, and today I’m in my apartment. But when I was in Kansas with family, my dad lit off what is known as a quarter stick. But don’t worry, absolutely no children were around. Okay, look, the point is that today we’re going to talk a…
All Trump Advices From The Apprentice For Success
I’ve always felt location is important, but the people behind the deal are much more important than a location. I’d much rather have a really smart, talented guy doing a deal in a not-so-good location than an idiot doing a deal in a great location because…
Khanmigo: Create a Lesson Plan Activity
This is Kigo, an AI-powered guide designed to help all students learn. Conmigo is not just for students; teachers can use Conmigo too by toggling from the student mode to teacher mode in any course. Teachers can always access Kigo by selecting the AI acti…
Worked example identifying observational study | Study design | AP Statistics | Khan Academy
So we have a type of statistical study described here. I encourage you to pause this video, read it, and see if you can figure out: Is this a sample study? Is it an observational study? Is it an experiment? And then also think about what type of conclusio…
Change in demand versus change in quantity demanded | AP Macroeconomics | Khan Academy
What we’re going to do in this video is a deep dive into the difference between demand and quantity demanded. In particular, we’re going to focus on change in demand versus change in quantity demanded. And so just as context, I have price versus quantity…
Take an Epic Journey With the Elk of Yellowstone | Short Film Showcase
[Music] The tools of my trade are satellite collars. [Music] Here she goes, start getting locations and find out where she migrates. [Music] [Music] [Music] [Music] It’s like sending yourself a Christmas present in the mail. I put this collar on, and we d…