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
Brass Trunk Corner | Diggers
Kg and I are in Montana at decision point with our archaeologist marked, and we’re on the hunt for Lewis and Clark nectar. In 1803, President Thomas Jefferson hand-selected Meriwether Lewis to lead a top-secret army Expedition into the lands Northwest of …
Having Hip Replacement Surgery: What to Expect
I, I, I need a hip replacement. For 32 years of playing squash, my right hip is killing me. I want to get back in the game. I’ve been avoiding it for two years. I could go anywhere. I could go to Abu Dhabi. I could go to Dubai. I can do anywhere in the Un…
Partial derivatives, introduction
So let’s say I have some multivariable function like f of XY. So it’ll have a two variable input is equal to I don’t know x^2 * y plus s of y, so it’ll output just a single number. It’s a scalar valued function. Question is, how do we take the derivative…
No More Gas | The Worst Energy Crisis In 40 Years
The U.S. is facing a diesel shortage. The price of diesel has been soaring for months. In 25 days from now, there will be no more diesel, up 27 and 28 percent. It’s a very, very high bill. “What’s up guys, it’s Graham here.” So, in 1973, the United State…
Comparing prokaryotic and eukaryotic cells | High school biology | Khan Academy
In other videos, we talk about how cells are the basic building block of life. In this video, we’re now going to talk about the two main categories of cells: prokaryotic cells and eukaryotic cells. So, what I’m going to do here is I’m going to diagram ou…
How One Brilliant Woman Mapped the Secrets of the Ocean Floor | Short Film Showcase
19:12. A German meteorologist named Alfred Wegener proposed the theory about how the Earth’s landmasses formed. He suggested that the great continents of the Earth had once formed a single landmass called Pangaea, which had broken up and drifted apart ove…