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 Science Says It's Good for Kids to Lie | National Geographic
[Music] My name is Ellen. I’m a research assistant at Kong Leaf Development Lab. This is where we do our deception studies, and here we play three games with the kids. You’ve been doing such a good job, and we got off to such a good start that I kind of w…
Why Pride Is the Worst | The Seven Deadly Sins | PRIDE
Of all angels, Lucifer was the most magnificent God had created. Aware of his beauty, brilliance, and many qualities, Lucifer felt elevated above the other angels and, at some point, even above God. He wanted to be like God, so he created a throne for him…
Watch Musk Ox Battle One of the Harshest Climates on the Planet | Short Film Showcase
The eyes stretch to nothing but an empty horizon and a landscape covered in its entirety by endless white sheets of snow. And with that, it’s freezing temperatures and harsh conditions. How could anyone or anything possibly survive in such conditions for …
How to communicate with Khanmigo | Introducing Khanmigo | Khanmigo for students | Khan Academy
What we’re going to do in this video is talk about how you can use Kigo if you need help or if you are stuck on something. So, let’s say you’re having trouble in your math class. You might want to go to the activity “Tutor Me Math and Science” because we…
How The Immune System ACTUALLY Works – IMMUNE
The human immune system is the most complex biological system we know after the human brain, and yet most of us never learn how it works or what it is. Your immune system consists of hundreds of tiny and two large organs. It has its own transport network …
If You Know These 15 Words, Your English is EXCELLENT!
I’ve got 15 words - and if you know all of them, your English vocab is better than 97% of people worldwide. In other words, you’re an English vocab pro. So, do you think you’re in the top 3% of English speakers? Let’s find out. Here’s how this is going to…