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 Four Cowboys Rode Wild Horses 3,000 Miles Across America (Part 2) | Nat Geo Live
April first, we began our journey that is at the border of Arizona and Mexico, and I promise you we did not plant that flag there. We just rolled up in real life; it’s kind of photogenic. We’ll take a picture next flag. So we started our journey, and we …
40 AI Founders Discuss Current Artificial Intelligence Technology
What is the most maybe unexpected way that you use AI in your regular life? Yeah, I don’t know if I should say this, but uh, writing speeches for weddings. Yeah, we both set our answering machines to our boy’s spot. “Hey, how’s it going?” “Oh, it’s th…
Should You Buy Index Funds Now, in an Overvalued Market?
So it’s no secret that on the back of the Magnificent 7, all this hype around AI, the stock market has gotten pretty darn expensive. Now, of course, we can argue that point depending on whether you’re a growth investor or a value investor, but just objec…
Jamestown - the impact of tobacco
When we left off in the last video, things were not going particularly well for the English settlers at Jamestown. They had managed to survive a couple of years by the skin of their teeth, but by 1610, they had endured such incredible starvation that they…
Doing these things might feel good, but they won’t derisk your startup.
You could be in that bottomless pit for years and be a startup founder that’s never built a product and has never gotten a single customer because you just cycled in and out of various forms of startup mentorship. The collecting of mentors, advisors—oh, …
Psychology of a Serial Killer (the Jeffrey Dahmer Story)
Foreign those words were spoken by Jeffrey Dahmer, a serial killer, a sex offender, necrophiliac, and cannibal who brutally murdered 17 Milwaukee young men throughout the late 70s, 80s, and 90s. Dahmer’s story makes for a chilling example of a psychopath …