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
Creativity in algebra | Algebra 1 | Khan Academy
[Music] [Music] Hi folks, Sal Khan here, and all I have to say is that algebra is perhaps the most pure way of expressing human thought. And like everything dealing with human thought, it’s incredibly creative. But you don’t have to take my word for it; w…
Finding equivalent ratios in similar triangles | Grade 8 (TX) | Khan Academy
We’re told Triangle FGH is similar to Triangle KLM. Which proportion could we use to find the length of segment KL? So segment KL is this one right over here, and they put an X there for the length of segment KL. Pause this video and see if you can figure…
An Alaskan Storm - Behind the Scenes | Life Below Zero
We are here to document the lives of people living in Alaska. The harsh reality is the environment we’re up against. It makes it tough to do our job. Get out of there, working on Life Below Zero can be very dangerous. Guns here, cameras here; never know w…
How we keep track of every private jet on earth!!!
Know every airplane that’s out there for sale. We know every detail about it, and we know who’s representing what buyers and sellers. You need technology and you need data. But once they get in here, if you don’t get to keep their attention, you’re going…
How to Fix the 'Finfluencer' Problem (feat. @ThePlainBagel)
I’m a billionaire. I can explain this in a way I might sound crazy. This is going to be the easiest money you can make in crypto: $2.7 million in one account. These cryptos are going to explode over the next 90 days. $14.1 million in another account, 102t…
How I built 6 Income Sources That Generate $59,750 Per Month
What’s up, you guys? It’s Graham here. So, I know I’m a bit late to the party, but for those of you that don’t watch Lyon Scribner—which you should be watching, Brian Scribner—so check him out. He posted a really good video earlier this month about how h…