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
Interpreting equations graphically | Mathematics III | High School Math | Khan Academy
Let F of x = 3x - 5 and g of x = x^3 - 4x^2 + x + 6. The graphs of y = F of x and y = G of x are shown below, and we see them right over here. This y = F of x is in, that is, in that purplish color. Let me see if I can get that same purplish color so tha…
What happened with Sillicon Valley Bank and what it means for the economy
I was asked to share my thoughts about the Silicon Valley Bank situation. I want to convey that, um, it’s very, uh, indicative of what the whole economy is like. So, there’s its particular situation and the FED coming in and guaranteeing all depositors, …
why starting a youtube is a brilliant idea (even if no one watches)
You’re posting on YouTube, spending hours on your content, and barely getting any views or subscribers. You’re probably wondering, “Why the hell am I even bothering?” Maybe you’re looking at other creators and seeing them grow way faster, and it’s got you…
Howard Marks: The “Easy Times” are Over for the Stock Market
If it’s the change I think it is, then what you should have in your portfolio going forward can be very different from what it has been. Billionaire investor Howard Marx is warning that the easy times in the stock market are likely over. In a recent inter…
Astronauts Training for Moon Missions | National Geographic
(Uplifting music) I’m astronaut Nicole Mann. I am astronaut Frank Rubio. I am NASA astronaut Jessica Meir. So there’s about a million things going through my mind as I think about going to the moon. You know that the little kid inside of me just get…
Is Meat Really that Bad?
Food is arguably the best thing about being alive. No other bodily pleasure is enjoyed multiple times every day and never gets old. It’s an expression of culture, our parents’ love, and a means of celebration or comfort. That’s why it hits a special nerve…