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
Running Your Company by Patrick Collison
So Patrick welcome. So Patrick is the co-founder and CEO of Stripe. He launched the startup, we’re now a pretty big company in 2010, correct? With his brother John. Why should we started working on it full-time in 2010? But it actually your comment just t…
Finding percentages with a double number line
We’re told that Omar’s class has 28 students in it. 21 of them take the bus to school. What percentage of the students in Omar’s class take the bus to school? Pause this video and see if you can figure that out. All right, well, I’m going to try to visua…
Geoff Ralston - Parting Advice
High startup school founders, I am Jeff Ralston, YC’s president, and I’m here to say so long and to give a few words of parting advice. It’s after 10 extraordinary weeks of startup school. We here at YC are about to focus on our winter 2020 batch, and yo…
Curvature formula, part 3
So continuing on with where we were in the last video, um, we’re looking for this unit tangent vector function given the parameterization. So the specific example that I have is a function that parameterizes a circle with radius capital R, but I also kin…
Carl Jung - How to Find Your Purpose
Your purpose is the reason you are here on Earth. It’s the thing that you were built for. So it’s an incredibly important thing to figure out because it’s the thing that guides you. Without a purpose, you’re lost. You have no North Star. Your life will fe…
Warren Buffett is SELLING!
So the 13Fs are out for Q1 of 2021. Of course, the 13F SEC filing shows us exactly what the big-name investors have in their portfolio, so we can see what they’re buying and selling from quarter to quarter. The only annoying thing, though, is that this in…