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
My Coffee Company Is Going Broke
What’s up guys, it’s Graham here. So this is a video I’m certainly not happy about making, but since I started this channel with the sole purpose of being as open and transparent as possible, I think I owe it to you to explain what’s going on and bring yo…
Multiplying and dividing decimals by 10, 100, 1000
In this video, we’re gonna get a little bit of practice multiplying and dividing decimals by ten, hundred, and a thousand. So let’s just start with a little bit of a warm-up. If I were to say, “What is two point zero five times ten?” Pause this video and …
Aretha Franklin Finds Her Sound | Genius: Aretha
[music playing] That was a wonderful performance. I wish I could stay. I think I sang really well. You always sing well. But we haven’t found it yet, have we? Not for lack of trying. So let’s get you back into the studio and put our heads together. Ham…
a chill day in my life
Good morning guys, it’s currently 11:20 a.m. - answering YouTube comments - okay so now it’s 12 and I think it’s enough scrolling so I’m just gonna delete all of the social media apps because it takes a lot of time. Let’s do my skincare - skincare time -…
Bullet Block Experiment Result
All right. Let’s watch it. Hopefully I am not horribly wrong. Derek is giggling to himself right now. Ok, you have made your prediction. Now it is time to find out which block went higher, the one that is shot off center or the one that is shot right i…
Climate Change 101 with Bill Nye | National Geographic
[Music] We hear it so much that it feels like a buzzword, but it is far from it. Climate change is a real and serious issue. But isn’t the climate always changing? What exactly is climate changing? Why should we care? Well, the Earth’s climate has change…