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
Miranda v. Arizona | Civil liberties and civil rights | US government and civics | Khan Academy
[Kim] You have the right to remain silent. Anything you say can and will be used against you in a court of law. We’ve become familiar with the Miranda Warnings given to suspects in police custody through movies and TV shows, but who was Miranda and what d…
Pathogens and the environment| AP Environmental science| Khan Academy
In this video, we’re going to be talking about pathogens and how an environment might help or hurt the spread of a pathogen. So first of all, let’s make sure we know what a pathogen is. “Patho” comes from Greek “pathos,” which is referring to disease. “Ge…
What is a tangent plane
Hey everyone, so here and in the next few videos, I’m going to be talking about tangent planes. Tangent planes of graphs. I’ll specify that this is tangent planes of graphs and not of some other thing because in different contexts of multivariable calculu…
Free Markets Provide the Best Feedback
Mark Andreessen summarizes this nicely as “strong opinions loosely held.” So, as a society, if you’re truth-seeking, you want to have strong opinions but very loosely held. You want to try them, see if they work, and then error-correct if they don’t. But…
Calming an Overly Excitable Dog | Cesar Millan: Better Human Better Dog
[suspenseful music] [knock at door] Hi, Cesar! Hi, guys. How are you? Good morning! I have a surprise for your final challenge. NARRATOR: For the past month, Cesar has worked closely with the Calderones, a family of first responders, with a red-zone pit …
How AI, Like ChatGPT, *Really* Learns
The main video is talking about a genetic breeding model of how to make machines learn. This method is simpler to explain or just show. Here is a machine learning to walk, or play Mario, or jump really high. A genetic code is an older code, but it still c…