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
solo trip in Italy 🇮🇹 |Having a lunch with a stranger 🍝
Even though I hate solo trips, in order to take Italian medical admission tests, I needed to go to Rome alone. Here is the journey, enjoy! Hi guys! Hi guys! Hi guys! Guess who is in Rome? Yes, I am in Rome! Even though I visited Milan back in high school…
How Big Can a Person Get?
Hey, Vsauce. Michael here. Ten centimeters - about four inches. This is how much taller on average people are today than they were 150 years ago. Better nutrition and medical care early in life has allowed us to better take advantage of the blueprints wi…
Gisele Bündchen: Why I'm Involved | Years of Living Dangerously
I think it’s important for people to take notice about climate change because it is important for our survival. It’s important for everyone’s life. I want to do something now before it’s too late, and that’s why I’m doing this documentary. Quite frankly,…
How to get your Real Estate license and become a Real Estate Agent
What’s up you guys? It’s Graham here. So if you didn’t already know, how I make most of my money is by working as a real estate agent, and I do that full-time. I’ve been doing this since 2008, and one of the most common questions I get is, “Graham, how do…
A productive day in my life vlog
Hi guys, it’s me, Dude! Today, we’ll look at a day of a productivity ninja. I woke up at 5:30 AM using my Yabai sunlight alarm. I represented my waking up scene to show you guys how I feel when I wake up super early. We had many things to do this day, so…
Rick and Morty Writer: Ryan Ridley
All right, man. We should probably jump into Rick and Morty at some point. Um, before we do that, uh, how about you just like give your background of up until Rick and Morty? So, I didn’t really know what I was doing with my life. I was a terrible studen…