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
8 Stocks Warren Buffett is BUYING
So I’m going to let you in on a well-kept secret in the world of investing. If you want to know what stocks you should be buying, look at what stocks the greatest investors in the world are buying. The number one investor you should be watching is none ot…
The Dangers of Oversharing | STOICISM
In a world saturated with unfiltered thoughts and endless streams of personal confessions, the true strength lies in restraint. While the modern ethos screams to share everything everywhere, the ancient Stoics whispered the timeless secrets of wisdom and …
Peter Lynch: Buy These 5 Types of Stocks (Rare Clip)
When most people think about investing in stock market, they dream about investing in a fast grower. A company that is growing at over 25 percent a year—at 25 a year a company’s profits will double in three, they quadruple in six, and up eightfold in nine…
How to make 2024 the best year of your life
3 2 1 New Year’s resolutions. The helpful tool, or a stressful mandate that society seems to expect of us every year? Probably both! If you’re like me, you think about making a list of what you want to accomplish or the type of person you want to become …
3 FREE ways to future-proof your skills in the AI age
With the rise of AI, the job market is shifting fast. Here are three things you can practice for free on Khan Academy to future-proof your job skills. Number one is critical thinking. While AI can handle vast amounts of data, in the end, it’s humans who …
The Day the Dinosaurs Died – Minute by Minute
One of the greatest illusions in life is continuity. 66 million years ago, the continuity of the dinosaurs had been going on for around 165 million years already, and it didn’t seem this would change anytime soon. The world was warm and pleasant, and most…