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
Misconceptions About Temperature
When you touch an object and it feels warm or cold, what is that really telling you about the object? Here, I have a metal hard drive and a book, and I’m going to ask people to compare their temperatures. Which one do you think will feel warmer - the boo…
Gov Of The Gaps (Mirror)
We’re getting a lot of disease in our town lately, and we don’t know how to stop it. Does anyone have any ideas? “Yes, I have an idea.” “Mr. Scientist, go ahead.” “Yes, I have this theory. You see, that disease is caused by teeny tiny little life forms…
Coordinate plane relationships
We’re told Jazella plots the ordered pair (4, 3) on a coordinate grid by moving four units to the right and three units down from the origin. Which statement is true? So pause this video and have a go at this before we do this together. All right, now be…
Inflation Just Hit a 13-Year High and Investors Are Worried
So in the past week, the Federal Reserve has had their little meeting and decided to keep interest rates exactly where they are until their next meeting. So for those that don’t know, the Fed meets eight times per year to discuss monetary policy. With in…
Building a Tree Stand in the Arctic | Life Below Zero
[Music] Gonna swing when it comes off that corner. Put it down, just let it go. Relax, it’s not gonna go anywhere. That’s a lot better there than a minute ago, swinging off the ladder. Fortunately, no accidents happened. A couple of times, some good close…
Translation (mRNA to protein) | Biomolecules | MCAT | Khan Academy
So we already know that chromosomes are made up of really long strands of DNA all wound up into our into themselves. Something like I’m just kind of drawing it as a random long strand of DNA all wound up in itself. On that strand, you have sequences which…