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
The Housing Market Just Went Negative
[Music] What’s up, real estate? It’s BlackRock here, and in the last few days, I have been overwhelmed with non-stop requests to talk about what appears to be one of the biggest and most controversial real estate stories of the entire year. It’s the claim…
Strasbourg Euro Rant HDQT
Kevin: Oy, your roaming investor in the middle of Strasburg, France. Why do you care? Because this is the center of the EU. This is where the Parliament is. This is the epicenter of where all the decisions are made for the European Union. Now, let’s talk…
why i don't spend money
These are five ways that I’m able to save a lot of money: Reuse grocery bags as trash bags instead of buying them from Costco. Only do laundry after 9 PM on weekdays when electricity is the cheapest. Skip the bottled water and drink right from the tap. Y…
Y Combinator Is Back In Person
We have a grand nefarious strategy of giving founders what we wish we had when we were a founder. Yeah, it’s like, what would I have wanted? Yeah, like, that’s certainly how I think about this. This is Michael Seibel with Dalton Caldwell. Today, we actual…
🐝 Behind the Scenes of Rock, Paper, Scissors! 🪨📄✂️
Hello Internet! Well, that Rock Paper Scissors video ended up being the biggest, hardest, most crazy-making video ever. Why, you ask? Looks like it’s only 3 minutes. Oh, I know, I know that’s what it looks like! But that video is the entrance to a maze o…
Derivatives expressed as limits | Advanced derivatives | AP Calculus BC | Khan Academy
Let’s see if we can find the limit as h approaches 0 of (5 \log(2 + h) - 5 \log(2)), all of that over (h). And I’ll give you a little bit of a hint, because I know you’re about to pause the video and try to work through it. Think of your derivative proper…