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
Michael Burry Just SHORTED Tesla Stock!
[Music] Hey guys, welcome back to the channel! Got an exciting bit of news to talk about today. Um, controversial, definitely controversial. Michael Burry is shorting Tesla stock. So, Michael Burry, you guys probably know him from “The Big Short.” He’s …
Chicken Powered Steadicam - Smarter Every Day
Hey, it’s me, Destin. You remember I made the chicken head tracking video? The reason the chicken’s head stays stable is something called the vestibulo-ocular reflex. One thing that kept popping up is people always had the suggestion of making a camera st…
The Next Generation's Champion of Chimps | Podcast | Overheard at National Geographic
So it’s just two of us, and then there were the marijuana growers who had automatic weapons with them. We stumbled upon them in the forest, and they saw us too. This is the hot, humid forest of southwestern Nigeria. It’s a tropical jungle teeming with lif…
Will CORONAVIRUS Cause the Next RECESSION | Ask Mr. Wonderful #20 Kevin O'Leary and Mark Cuban
Okay, soft the studio. But before I go, I’m starting to really get into these enemy sunglasses. Yeah, this is Alpha M Steel. Two choices for today: diggin’ these, but also like these—not bad. Hmm, I look spectacular! I’m going with these today. Anyways, …
Candle Trick
Tonight we’re going to show you a candle trick that you can use to impress your date at your next candlelit dinner. What we’re going to show you is how you can light a candle without touching the wick. Okay, so Nigel is going to, uh, light up a wooden sp…
Khan Academy in the classroom | Limits and continuity | AP Calculus AB | Khan Academy
We have this big moment, and the moment is that for 35 years of my teaching career, I walked into the classroom having no idea if the kids had done the homework or what their commitment was to this subject. And then suddenly, there’s this coaching platfor…