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
How Facebook is Stealing Billions of Views
A few days ago, Facebook proudly announced that they’d achieved eight billion video views a day. That’s really impressive, until you learn that in the first quarter of 2015, seven hundred and twenty-five of the 1000 most-viewed videos on Facebook were sto…
How Generosity Built Tech Giants
Sometimes founders are afraid of asking the like the dumb question, but that’s a worthwhile question to ask. If you can help your customer make more money, they’re probably gonna like you. This is Michael Cybo with Dalton Caldwell, and today we’re going t…
Gordon Goes Spearfishing for Snapper | Gordon Ramsay: Uncharted
Beautiful. Yeah. While it will be easy to spend the rest of the day relaxing on this beautiful beach, there’s work to be done underwater. That snapper I just tasted is exactly what I need for my big cook, and legendary local spear fisherman Tony is the ma…
RC natural response example (3 of 3)
We just derived what the current is and the voltage. These are both the natural response of the RC. Now, what I did is I went ahead and I plotted out this using a computer, just using Excel to plot out what these two expressions look like. Let me show you…
How to Improve Creativity Skills
Creativity, creativity! According to dictionary.com, it is the state or quality of being creative. Thanks! So, if you’re wondering how to become more creative, then you’ve probably already searched how to be more creative on YouTube and found a couple of …
Michael Jibson: Playing Myles Standish | Saints & Strangers
Miles Sish was the um military representative on the Mayflower. He went out as a kind of pilgrim as well to find his patch of land, I suppose, in the New World. But he was the military adviser. He was always at the front of the group of people that would …