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
Hiring Engineers with Ammon Bartram
Hey guys, today we have Almond Bartram, co-founder of Socialcam and Triplebyte, and he is here to talk to us about hiring. So, could you just give us a quick intro about what you’ve worked on? Cool, so I joined Justin.tv fresh out of school in 2009. It w…
Adorable Bear Cubs Crash Campsite | Expedition Raw
So I just came around the corner, found this female on the beach here, and I thought I recognized her. She’s one of the mothers as having cubs. So I was looking for the cubs all up in the forest here, and then all of a sudden I was like, “Ah, there they a…
Top 10 Most Expensive Suits In The World
Top 10 Most Expensive Suits in the World Welcome to A Lux, the place where future billionaires come to get inspired. Hey there, Alexis, and thanks for choosing to spend some time with us today. If you’re craving some facts and figures pertaining to the b…
Lateral & total surface area of rectangular prisms | Grade 8 (TX) | Khan Academy
We’re asked what is the lateral surface area of the rectangular prism and then what is the total surface area of the rectangular prism. Pause this video, have a go at this before we do this together. All right, now let’s first focus on lateral surface ar…
Your Theme
Did you set a New Year’s Resolution for yourself? How’s that going? I don’t know when in the year you’re watching, but if I had to bet on the status of your resolution, it’s probably not flourishing, but failed or foregone. This is usually what the effort…
15 Investments That Will Make Your Children Rich
Would you be happy with your children living the life you’re living right now? If you are, that’s great, amazing! You’ve done it right. Now, you’ve got to keep going. If you’re not, that’s okay, because we’re going to work on those goals today. The numbe…