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
Suspicious Shampoo (Clip) | To Catch a Smuggler | National Geographic
Right this way, guys. You live in mainland China. Yes. Okay. Do you bring anything from China to the United States? No. You have a good day. Thank you. How are you doing? Good. What’s the purpose of your trip? What did you do? Just hang out the weekend. …
Mellody Hobson on investing in the market during Covid-19 | Homeroom with Sal
Hi everyone! Welcome to the daily homeroom live stream. We have an exciting, I guess we could call it a show today. Just to get everyone on the same page, what this thing even is: if you’re showing up for the first time, we’re doing these live streams as …
Setting up a system of equations from context example
In this video, we’re going to get some more practice setting up systems of equations, not solving them, but just setting them up. So we’re told Sanjay’s dog weighs 5 times as much as his cat. His dog is also 20 kilograms heavier than his cat. Let c be the…
A Wicked Tongue | Wicked Tuna
[Music] Let’s go fishing! It’s week five, and we’ve caught three fish so far. But last trip, things got a little rocky with my mates, Brad and Lance. “Ask you one simple thing and you flip the out! This is my boat! I’m the captain! I’m the boss! And tha…
Crisis | Vocabulary | Khan Academy
Wordsmiths, we’re in it now, you and I. The situation has become very serious. You might even say it’s a crisis. Yes, crisis is the word we’re going to be looking at in this video. Crisis, it’s a noun. It means a tipping point, a very dangerous period or …
THE 6 BEST CREDIT CARDS YOU NEED IN 2020
What’s up guys, it’s Graham here! So, as I’m sure many of you are aware, the one thing I love more than anything, even more so than finding really creative ways to ask you to smash the like button for the YouTube algorithm, would be credit cards. That’s …