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
Warren Buffett: How to Invest Tiny Sums of Money
I think if you’re working with a small amount of money, I think you can make very significant sums. But as soon as you start getting the money up into the millions, many millions, the curve on expectable results falls off just dramatically. So, I just cam…
Buy Great Companies that Goes Up and UP and Sit on Your A$$ Investing | Charlie Munger | 2023
Picking your shots, I mean, I think you call it sit on your ass investing. The investing where you find a few great companies and just sit on your ass because you’ve correctly predicted the future. That is what it’s very nice to be good at. A lot of what…
Edgar: crowdfunding drive
Uh, my name is Thomas, and last year I made the film “George Ought to Help.” Right now, I’m working on a follow-up called “Edgar the Exploiter.” It will be similar to George in that it will be a gentle pro-liberty propaganda piece, because George was a s…
Warren Buffett's 3 New Stocks for 2022!
Well, it’s that time again. 13F season is upon us, which means we get to glimpse inside the buys themselves of the world’s, uh, biggest and most successful investors. Today, we’re kicking things off with the granddaddy himself, Mr. Warren Buffett. So, th…
50 Years Ago, This Was a Wasteland. He Changed Everything | Short Film Showcase
[Music] 50 years ago, you couldn’t hardly walk through this place. It was wall to wall. [Music] Brush! There wasn’t any grass, there wasn’t any water. Nobody wanted. [Applause] It on the truck, on the truck! He’s the finest dog in the United States of Am…
Introduction to vertex form of a quadratic
It might not be obvious when you look at these three equations, but they’re the exact same equation. They’ve just been algebraically manipulated. They are in different forms. This is the equation and sometimes called standard form for a quadratic. This is…