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
Mr. Freeman, part 48
What are you looking at? You think I don’t know who you are and why did you come to our disco? Or you have something that is unknown to us? Of this yelling to make everybody free begins to spin our guts. Why you came to bothering us again? Eh? Before you…
Adding and subtracting fractions with negatives | 7th grade | Khan Academy
Let’s say we wanted to figure out what (3 \frac{7}{3}) minus (-\frac{7}{3}) minus (\frac{11}{3}) is. Pause this video and see if you can have a go at it before we do it together. All right, now let’s work on this together. You might be tempted to deal wi…
How I Escaped Corporate Hell (They Don't Want You To Know This)
Speaker: To raising your vibration, this is the video version of my podcast. If you want the audio version you can click the link in the YouTube description. Apologies guys, if you’re listening on the audio that was a YouTube intro and vice versa. If you …
How To Be A Financial Minimalist
What’s up you guys? It’s Graham here! So this is a term I really want to make more popular and bring more mainstream, and that would be financial minimalism. It’s a term I thought of last week while trying to find a catchy title for my video where I went …
Millionaire Financial Advice For 18-35 Year Olds | Millennial Money
What’s up you guys, it’s Graham here! So for those who have not seen my second channel, The Graham Stefan Show, I regularly review a series by CNBC which covers the common everyday financial habits and financial mistakes of millennials, which is appropria…
Standard normal table for proportion between values | AP Statistics | Khan Academy
A set of laptop prices are normally distributed with a mean of 750 and a standard deviation of 60. What proportion of laptop prices are between 624 and 768 dollars? So let’s think about what they are asking. We have a normal distribution for the prices, …