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
Secant line with arbitrary difference (with simplification) | AP Calculus AB | Khan Academy
A secant line intersects the curve ( y ) is equal to ( 2x^2 + 1 ) at two points with ( x ) coordinates ( 4 ) and ( 4 + h ), where ( h ) does not equal zero. What is the slope of the secant line in terms of ( h )? Your answer must be fully expanded and sim…
Guardians of the Okavango | National Geographic
I’m a guardian of the guardians. I feel a duty to protect these guardians from what is the outside world, encroaching. I work within the National Geographic Okavango Wilderness Project as the community liaison with the people living in these Angolan highl…
The Moment That Broke His Memory | The Long Road Home 360
[Music] I don’t think I’ve been just Carl since that day. PTSD to me is not a disorder; that is a reasonable reaction to something traumatic that you have been through. [Music] Looking back, we were also green; we had no idea what we were doing. SolarC…
Meth in the City (Clip) | To Catch a Smuggler | National Geographic
If you take a quick look at this, so you don’t see anything. Okay. The only thing that might give it away is this part, what we glued it again, so that it’s an indication that somebody opened it up and glued it back again. Now, you can see here the vein,…
ROBOFORMING: The Future of Metalworking? (I Had NO IDEA This Was Possible) - Smarter Every Day 290
My brain’s on fire. Hey, it’s me, Destin. Welcome back to Smarter Every Day. We are right in the middle of a manufacturing deep dive series. And you may recall in a previous video, we went to a progressive metal stamping factory, and this place was incred…
Speaking the Language | Saints & Strangers
You’ll want them in my saucer. II Hello, catch! Working with the Aventa key language is a huge opportunity. It’s something that I welcomed with open arms. It was something that I felt was a responsibility as a native actor. And I can’t come to me! I ha…