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
How Ozempic is Currently Breaking the Stock Market (and Denmark’s Economy)
If you look at Europe’s largest companies, you get some familiar names: Accenture, Hermes, L’Oreal, semiconductor manufacturer ASML, and the luxury goods behemoth that is LVMH. But another name that is very quickly charged its way to the top of the list i…
2015 AP Biology free response 7
Smell perception in mammals involves the interactions of airborne odorant molecules from the environment with receptor proteins on the olfactory neurons in the nasal cavity. The binding of odorant molecules to the receptor proteins triggers action potenti…
My Meditation Regimen
And usually, do you have a 20 minutes a day, twice a day? What is your regimen? Yeah, I try to do it twice a day for 20 minutes each time. Usually before breakfast and before dinner. Um, but I’m not perfect. You know, I would say probably a third of the …
How interest rates affect interest rates, financial flows, and exchange rates
What we’re going to do in this video is try to think of the chain of events that would happen if the supply of loanable funds were to increase in the United States. The way that that could happen is, let’s say, the Federal Reserve were to, so to speak, pr…
15 Beliefs That Limit Your Success
Your brain purposely makes you feel like you’re weak. The reason for this is to protect you from potential future pain, and in this process, it creates a series of myths about you which you believe to be true. When, in fact, they are just lies your brain …
Moving Back To California
What did Tesla just do? They moved back into the state of California. Disney’s moving their jobs back from Florida to the state of California. It’s at the point now where some staffers are ready to quit their jobs over the matter. Many tech companies have…