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
3 Ways the World Order is Changing
I’m desperately trying to pass along, uh, my thoughts to help you to understand how the world order is changing. Um, and it’s changing in three very important ways. It’s changing financially and economically in important ways that you could see. It’s chan…
Drew Houston - CEO and Founder of Dropbox | Entrepreneurship | Khan Academy
So, uh, excited to have Drew Hon here. Uh, you know, a very well-known figure amongst kind of our team out here. Um, and for those who are maybe watching this video later, uh, founder of Dropbox. How many, how many billions of people do you have using? I …
Drop Little Droplets in My Head | StarTalk
You and I, uh, attended a party at my house, and kids, like, surr, they want to talk to you. They know who you are, and they have questions. Yeah, yeah, ‘cause my teacher can’t understand what I’m asking. I think adults also have questions, but they forgo…
how lofi hip-hop took over youtube
I read through a lot of the comments on my videos. I’ll usually heart the ones that make me laugh or just stick out to me in some way. A lot of them are really nice and thoughtful; others are just weird. But whether it’s good or bad, insightful or just a …
Plague 101 | National Geographic
[Narrator] Plague is notorious for causing mass sickness and devastation. But as much tragedy as the disease has caused, it also helped drive crucial scientific and social progress. Plague is an infectious disease caused by the bacterium Yersinia pestis. …
Don't make the investor your customer.
These conformists are also now invading the startup world, and I agree with you. Right? The highest status job in the early-stage startup world is investor. Right? It’s the one everyone wants to meet, everyone’s talked to, everyone seeks approval from, an…