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
Welcome to the Chop Shop | Underworld, Inc.
I think I own probably about 11 cars personally, old to new. Drop a top and hit the highway and ride out, you know what I mean? You and your lady, you get money on the level. I get it; you can buy whatever you want—a legit business in the daytime, and at …
The Biggest Ideas in Philosophy
In the city of Cyprus in 300 BC, there lived a very wealthy traitor called Zeno. While on a voyage from Phenicia to Perez, his boat sank along with all of his cargo. Because of that single event, an event that was entirely out of Xeno’s or anyone’s contro…
13 SIGNS YOU MIGHT BE UNDERVALUING YOURSELF WITHOUT REALIZING IT | STOICISM INSIGHTS
Imagine just for a moment that the most powerful tool for a meaningful, fulfilled life isn’t something you can buy, earn, or be given by others. It’s already within you, waiting to be discovered and harnessed. This isn’t just a thought experiment; it’s a …
Emotional Manipulation: A Masked Reality
Manipulation is everywhere. The social influence aimed at changing the behavior or belief of a person through emotional coercion. Emotional manipulation has always been prevalent in human interaction. It’s in all of our relationships. Companies use it on …
Is a US Recession Really Coming Soon?
This video is sponsored by Seeking Alpha. Sign up to Seeking Alpha Premium using my link to score a 7-Day free trial and $25 off your annual subscription. Is the US really headed for a recession? A week ago, you probably saw the stock market take a decen…
Identifying scale factors
So right over here, figure B is a scaled copy of figure A. What we want to do is figure out what is the scale factor to go from figure A to figure B. Pause the video and see if you can figure that out. Well, all we have to do is look at corresponding sid…