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
5 Things EVERYONE Should Know Before Buying a House!
What’s up you guys, it’s Graham here. So, these are the top 5 things you should know before buying your first property. Now, I’ve been in real estate for about 10 years now, and over this 10 years, I’ve sold about 100 homes, including 5 homes that I bough…
15 Gifts That Go Up in Value Over Time (Gift Ideas for Rich People)
Rich people focus on the inner value of a gift, not necessarily on the price tag. But any Master Gift Giver knows that they’ll be better off if you give them an asset instead of a liability. The gifts you give build relationships, so this season be though…
Don't Worry, Everything is Out of Control | Stoic Antidotes to Worry
Even though we can’t control the future, we’re worrying ourselves sick because of it. This could be because we don’t control the future. And this lack of control is the reason it frightens us. Or, we think we can control it by ‘thinking about it’ or perha…
Average Net Worth By Age (The Sad Truth)
What’s up, guys? It’s Graham here. So, the other day, I came across an article which found that 60% of Americans are currently living paycheck to paycheck. That got me thinking: what is the average net worth throughout every age, and is that realistically…
How do you prepare yourself mentally to be an entrepreneur?
So how do you prepare yourself mentally to be an entrepreneur? What I will say is maybe borrowing a little bit from Buddhism or philosophical Hinduism, but it’s really this notion to try to not get attached to the outcome. Obviously, you’re going into en…
The Soul of Music: Sampa The Great Returns to her Roots | Podcast | Overheard at National Geographic
Foreign [Music] Douglas: I’m a producer here at Overheard, and this is the second episode of our four-part series focusing on music exploration and black history. It’s called The Soul of Music. National Geographic explorers will be sitting down with some…