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
10 Things That Disturb Inner Peace
Let’s do some backwards thinking today. In order to achieve inner peace, we might want to explore what actually stands in the way of achieving it, so we can eliminate these things and reach a state of tranquility. In this video, I will present you… 10 thi…
Dinosaurs 101 | National Geographic
(Dramatic music) (Roaring) - [Narrator] Probably no other creatures on the planet have struck as much fear and awe in our hearts as the dinosaurs. (Roaring) The earliest dinosaurs appeared about 245 million years ago during the Triassic Period, when most …
REVIEWING MY 2008 LOTUS EXIGE S240
What’s up you guys? My name is Graham, and this is a review of the 2008 Lotus Exige S 240. By the way, just a quick background: Lotus is the brand that got me into cars to begin with. Before I saw a Lotus, I didn’t give a [ __ ] about cars. Well, my first…
Manipulating expressions using structure | Mathematics I | High School Math | Khan Academy
So we’re told that suppose a plus b is equal to zero. Which of these expressions equal a * b? And like always, pause the video and see if you can figure it out. These are actually pretty fun problems! All right, so let’s see if we can do a little bit of …
For this week's National Financial Awareness Day...
Man, bro, let me tell you what had went down, and I was two beds away from getting bro whole Barbershop, bro. Yeah, oh my mama, bro, peanut gonna call my phone talking about I just got paid. I looked at the phone, “You just got paid? What, man? What the d…
How Animals and Humans Clash and Coexist in Yellowstone | Nat Geo Live
For 20 years, my camera’s led me to some pretty extraordinary places. I could have never imagined that I would be standing on the streets of a place like Pyongyang, North Korea, and 20 years later, I came back to the United States with my cameras, and it’…