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 Auto Market Bubble Just Popped
What’s up, Graham? It’s guys here, and it’s official: the auto market bubble has popped. Despite used car values previously outpacing that of housing, fine art, and the stock market, they’ve now just seen their largest decline in a decade. Electric vehicl…
Balloons on the River - (Decatur - Sufjan Stevens) Alabama Jubilee
One two three [Music] four. Our stepmom, we did everything to hate her. She took us down to the edge of the theater. We saw the lion and the kangaroo. Take her down to the river where they call the wild. [Music] Alligator singing man overflow C the mudl o…
I Didn't know Birds use Math in Murmurations! - Smarter Every Day 234
I don’t know why, but every day in that tree right there, birds congregate together. Then, at some point, they lift off and they start flying together in a flock. You got all these birds that are just moving almost like they’re a macro-organism. You’ve go…
What It Takes to Keep America Beautiful | Podcast | Overheard at National Geographic
When we got in and we were on the beach, the first thing you notice is the dramatic, you know, uh, sea stacks that from a distance just, you know, they look like mountain ranges almost. But they’re so close. In May 2022, National Geographic photographer S…
Uncover Antarctica - BTS | National Geographic | OPPO
Antarctica is a land of extremes, and it’s got an incredible grand scale. So it’s very difficult to try and capture it with images. Being a National Geographic photographer creates an opportunity for me to document the world, and you don’t know what you’r…
Trekking Through One of Africa's Most Majestic Places | National Geographic
The Delta of the Okavango is, for me, the most majestic place on earth. From the expedition, you learn so much; it’s much more than science. It’s much more than just being in a pretty place. Personally, it changed every molecule in my body. It changed the…