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
How Weed Eaters Work (at 62,000 FRAMES PER SECOND) - Smarter Every Day 236
Hey, it’s me, Destin. Welcome back to Smarter Every Day. It’s time for the Weed Eater episode. And the way—I wanted to shut the door. The way you can tell that I’ve staged all this is that this Weed Eater’s going to crank up immediately. But here’s the de…
Vsauce Live Stream!
[Music] [Applause] [Music] Hey, Vsauce! Michael, Cameron, Jake here and we are very glad that you are here. What’s going on? Well, it’s our very first Vsauce YouTube livestream! They said it couldn’t be done, but actually, the technology has been possible…
_-substitution: defining _ | AP Calculus AB | Khan Academy
What we’re going to do in this video is give ourselves some practice in the first step of u substitution, which is often the most difficult for those who are first learning it. That’s recognizing when u substitution is appropriate and then defining an app…
Worked example: coefficient in Maclaurin polynomial | Series | AP Calculus BC | Khan Academy
Nth derivative of g at x equals 0 is given by. So the nth derivative of G evaluated at x equal 0 is equal to n + 7 over n 3r for n is greater than or equal to 1. What is the coefficient for the term containing x^2 in the McLaurin series of G? So let’s ju…
Jeff Bezos 1997 Interview
Rather, who are you? I’m Jeff Bezos. And what was your claim to fame? I am the founder of Amazon.com. Where did you get an idea for Amazon.com? Well, three years ago, I was in New York City working for a quantitative hedge fund when I came across the…
Estimating limit numerically | Limits | Differential Calculus | Khan Academy
Consider the table with function values for ( f(x) = \frac{x^2}{1 - \cos x} ) at positive ( x ) values near zero. Notice that there is one missing value in the table; this is the missing one right here. Use a calculator to evaluate ( f(x) ) at ( x = 0.1 )…