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
Why Millennials Don’t Make Enough Money
What’s up you guys? It’s Graham here. So this has been a really good week. I’ve had the chance to cover my two favorite topics on the history of the universe. One would be Robin Hood’s investing platform, and number two, as you could see from the title of…
Corn Dogs and Crushes: Teen Love at a Fair in the American South | Short Film Showcase
You either come here with somebody who has friends, or you come here to be exclusive, and you sit there and you show each other all. It’s all about being things. So, I’ll come right here to talk to girls. Some girls, I see a lot of pretty faces, pretty go…
Extracting Water on Mars | MARS: How to Survive on Mars
Water is the essential ingredient to life as we know it. Everywhere we look, water is where life is. So, that’s why the mantra for Mars exploration has been thus far: follow the water. We know some of the places where water happens to be because that’s cr…
Michael Burry's BIG Short Against Tesla Stock REVEALED!
Well, Michael Burry has released Scion Asset Management’s 13F filing for Q1 of 2021, and it was very interesting this time around. Firstly, lots of options. Secondly, big bets on interest rates going north, which is essentially a prediction that we’ll see…
Reacting to Myself: Living On $1.6 Million A Year In Los Angeles | Millennial Money
What’s up, you guys? It’s Graham here, and wow, what a time to be alive! We have officially entered the matrix. This is because I was just featured on the show Millennial Money by CNBC Make It. For those that are not aware of the significance of this, let…
Crystalline and amorphous polymers | AP Chemistry | Khan Academy
Let’s talk a little bit about crystalline and amorphous polymers. Now, in previous videos we talked about crystalline versus amorphous solids. Crystalline solids have a very regular pattern; maybe they look something like this if you imagine the particle…