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
Mohnish Pabrai: How to Invest in an Overvalued Market (2021)
I never focus on what is happening in markets and, uh, you know, macro events and all of that. I think at the end of the day what matters is how does a particular business do over a long period of time. I think the important thing in investing is can I te…
Determinant when multiplying a matrix by a constant
So let’s say that I have matrix A and its elements, it’s a 2x2: a, b, c, d. We have a lot of practice taking determinants of matrices like this. The determinant of this matrix, same thing as the determinant of a, b, c, d, it’s going to be equal to a times…
How Much I Make From YouTube #shorts
Hey, so for anyone curious how much I make on YouTube with three and a half million subscribers, here you go. I’ll take you into my analytics. So, in total, we did 110 million views this year, and as you can see, the views every day range anywhere from a…
Peter Lynch: Avoid These 10 Investment Mistakes
This is a very important rule. This is a very, it’s one of the key rules: the stock doesn’t know you own it. Remember that you could be a miserable person; you could have, uh, you know, never helped anybody, never done anything right, had 67 spouses, neve…
Response to Critique of Edgar The Exploiter
Hey everyone, I’m running a crowdfunding campaign for the creation of the third animation in the JAOT Help series. Uh, the name of it will be “Give Me Your Ball,” and you can find the link in the info box. So, if you didn’t take a look already and you hav…
Understanding and building phylogenetic trees | High school biology | Khan Academy
When we look at all of the living diversity around us, the natural question is, “Well, how related are the different species to each other?” If you put that into an evolutionary context, relatedness should be tied to how recently two species shared a comm…