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
Female Founders Conference - New York
[Applause] [Applause] [Applause] [Applause] [Applause] [Music] [Applause] Okay, let’s see here. Hi, hi everyone! Good afternoon! I think we’ll get started. You’re nice and cool inside, thank goodness. I lived in New York more than 20 years ago at this poi…
Down on Luck | Wicked Tuna: Outer Banks
Perfect time to catch the blue fin. Oh, oh, there’s some tones over there! They’re coming this way. Looks like a pretty good pot of them too. Dear Jesus, please God, let us get a fish right now. We are desperate to get some more meat on the boat. We’ve o…
Manipulating expressions using structure (example 2) | High School Math | Khan Academy
We’re told, suppose ( a + b ) is equal to ( 2a ). Which of these expressions equals ( b - a )? All right, I encourage you to pause the video and see if you can figure that out. Which of these expressions would be equal to ( b - a )? It’s going to just in…
These Men Love Extraordinarily Dull Things | Short Film Showcase
We formed the Dolan’s Club a while back. We got tired of reading and hearing so much about people always trying to get a fancier car, a bigger house, uh, travel to more exotic places, and come home and tell everybody they go to Las Vegas and come back sai…
The Secret That Silicon Valley's Top Investors All Share
If you look at the YC top companies list, anyone can look at this; this is on the internet. If you actually look at who invested in them, it’s all the biggest restaurants. So this is Dalton plus Michael, and today we’re going to talk about why the best in…
Turning $1M to $1B+: An Investing Masterclass from the Indian Warren Buffett (Mohnish Pabrai)
The opportunities that would truly make us wealthy are not going to come around every week. They’ll come around every so often, and they come around at unpredictable times. But when they do come around, and when you do recognize it, you need to act very s…