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
Intro to articles | The parts of speech | Grammar | Khan Academy
Garans, I would like to tell you a Tale of Two Elephants in order to get at the idea of this thing called the article, and we’ll explain what that is after I tell you about the elephant and an elephant. Now, articles are words like a, or an, or the. Arti…
Announcing Khan Academy Official LSAT Prep – Free for all!
Hi, I’m Sal Khan, founder of the not-for-profit Khan Academy, and if you are thinking about going to law school, know someone who is, or just care about equity of opportunity, I have some very exciting news. We are announcing—Khan Academy is announcing—t…
5 Steps To Getting Rich In Your 20's
What’s up you guys? It’s Graham here. So there’s a lot of videos out there about how to get rich in your 20s, and if you just do a search on YouTube for how to get rich, there’s literally a new video posted every single hour. If you think I’m exaggerating…
Paycheck Squabble | Wicked Tuna
What do you think of a nice tuna check when we go in? Oh right, one out. All right. I think we were fishing every day, really. Hmm, so far in this trip, we’ve already lost two paychecks. And to top it off, I still haven’t been paid for the first three fi…
Gen X Reacts to AIDS | Generation X
In 1985, Rock Hudson, Hollywood heartthrob, becomes the face of AIDS, and overnight the epidemic is no longer anonymous. I was on the set of The Breakfast Club when I heard about Rock Hudson, and to me, that sort of changed everything. It kind of finally …
$1000 Per Month For EVERYONE | New Stimulus Explained
What’s up guys, it’s Graham here. So lately, there’s definitely been a lot of talking discussion about the upcoming stimulus packages. After all, it’s the closest that we can get to receiving free money. Almost 20% of the United States is now out of work,…