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
15 Ways to Bet on Yourself (& WIN BIG)
People often say you should bet on yourself, or investing in yourself pays the best dividends. But what does that even mean? What exactly can you afford to bet, especially if you weren’t born into means? By the end of this video, you’ll have a game plan t…
ZOMBIE Bugs!!!: Mind Blow 12
Nes breathalyzer and what’s so great about these balls? Ah, Vsauce! Kevin here. This is mind blow. In Sonic CD, don’t make the blue blur wait too long or eventually he’ll say, “I’m a game,” and he’s dead. What Yoshi’s Island contains the zombie glitch? Wa…
Elli Sharef at Female Founders Conference 2014
Awesome! Hi everyone! I’m Kat Metallic, YCS Director of Outreach. I’m so super thrilled to see you all here. The next speaker that we have is Le Chef. Le is the founder of Higher Art, a tool that makes finding a job and recruiting employees less painful. …
The Peloponnesian War | World History | Khan Academy
As we’ve already seen, the fifth century BCE starts off with Athens and Sparta and various Greek city-states fighting on the same side against the Persian invaders. But as we saw in the last video, as soon as the Persians are dealt with, tensions start to…
3 year old reports on oil spill conditions on Alabama's Gulf coast
Hey, this is Sadie and daddy. Say hello, STI! Hello! And we are at the beach in Gulf Shores. What have we been doing this morning? We were playing. We’re going to the beach. Is there oil on the beach today? Did you see any oil? No, I didn’t either. What …
Leah Culver of Breaker and Tom Sparks of YC Answer Your Questions About Security and Podcasting
All right, so how about we start with some questions from Twitter. I actually think this one might have been on Facebook, so Brady Simpson asked, “How do we deal with the ever-increasing pressure from governments trying to get into devices?” Tom, do you …