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
It's Over: The Stock Market Bubble Just Popped
What’s up, guys? It’s Graham here, and it’s no surprise that everything is expensive. Housing costs more today than it ever has in history. The big short’s Michael Burry warns that stocks are heavily overvalued and poised to tumble. Experienced investors …
CREEPY WOODY !!! -- IMG! #31
Creepy Woody and this place is great for kids. Wait… It’s episode 31 of IMG! Parents are awesome, except when they play favorites. And here’s Bert in real life. There won’t be any cats in this episode, but there will be zombie jean shorts, rigor mortis gi…
Intralase LASIK Procedure with Fear-o-meter and Pain-o-meter
Hey, it’s me, Dustin. I had LASIK surgery here at some random doctor’s office. I’m not going to tell you which one it is, but, uh, anyway, the surgery went well, and I recorded it. Well, kind of recorded the video playing of it, so here it is, check it ou…
Persistence Of Vision
So tonight I’m hanging out with my friend Nigel, and he’s brought along one of his science toys—a little white plastic ball. Um, it’s not actually a white plastic ball at all. You told me you were bringing the white plastic ball tonight. It’s, uh, what co…
Non-congruent shapes & transformations
[Instructor] We are told, Brenda was able to map circle M onto circle N using a translation and a dilation. This is circle M right over here. Here’s the center of it. This is circle M, this circle right over here. It looks like at first, she translates it…
Let That Be a Lesson
I think what’s appropriate is a very simple story that I think you’ll appreciate. There’s an island right off the coast of South Africa where the largest population of sardines exists. Seals love sardines; hundreds of thousands of them sit on an island ju…