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
Mr. Freeman, part 49
I constantly hear - Freeman, what should we do? Give us a sign! Make a revolution! We will follow you! Aaah… You know all the answers to all of your questions, but you like it so much to pose as gifted with naivety girls… All right, I’ll retrieve the ans…
Make Strippers HOTTER and More! VSAUCE WTFs
Want some extra B sauce on your wtf? Well, you’re in luck! Ready, set, go! Wait, Toad, what are you doing? I—oh, clever! Taking advantage of a game’s glitch to shorten your lap time is one thing, but patience is another. See that guy over there? Let’s sh…
Worked example: finite geometric series (sigma notation) | High School Math | Khan Academy
Let’s take, let’s do some examples where we’re finding the sums of finite geometric series, and let’s just remind ourselves in a previous video we derived the formula where the sum of the first n terms is equal to our first term times 1 minus our common r…
STOCK MARKET HITS ALL TIME HIGHS - TIME TO SELL!!
What’s up you guys, it’s Graham here. So we’ve seen it again: stocks have just hit all-time highs. But the real question remains, how high can this go? And also, should we just sell it all? I feel like so many people are sitting on the edge of their seat,…
Will Berkshire Hathaway Stock Crash Without Warren Buffett? (w/ @InvestingwithTom)
[Music] Hey guys, welcome back to the channel. Uh, today we are continuing with the new money advent calendar. We’re going strong, and I’ve got another great guest on the channel for today. We have Tom from Investing with Tom. How you doing, buddy? Prett…
Marciano, I Would Not Do That | Wicked Tuna: Outer Banks
There’s a march now. We’re getting up to the bridge. What’s got to be concerned is there’s some big breakers, and you need speed to time it to get out between the breaks. And that’s the one thing we don’t have on this boat is speed. We’re gonna have to ma…