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
Jeremy Rossmann of Make School on Income Share Agreements and the Future of College
Okay, Jeremy Rossmann, welcome to the podcast! Jeremy: Glad to be here! Interviewer: You are one of the cofounders of Make School. So, for those who don’t know, what is Make School? Jeremy: Make School is a new college in San Francisco. We offer a bach…
Interpreting a parabola in context | Quadratic functions & equations | Algebra I | Khan Academy
We’re told that Adam flew his remote controlled drone off of a platform. The function f models the height of the drone above the ground in meters as a function of time in seconds after takeoff. So, what they want us to do is plot the point on the graph of…
Affordable Watches For Your Collection | Reacting To Underappreciated Watches FT. Teddy Baldassarre
This is the gateway drug. It is, I mean, this is it, so be careful. What if I told you this watch is around 300 bucks? Can’t be! You know, you instead of going out for dinner, buy a watch. Okay, Mr. Wonderful here, you know I’m doing a very special editio…
How to sell a $14,000,000 private jet.
That about 13 million, so the company is called. He’s acquired an aircraft cargo company. Right now, the goal is to have a charter service for between 8 to 12 to 15 kinds of people. Are they looking for somebody to work with them to acquire airplanes for…
The Web Is Not The Net
Hey, Vsauce. Michael here. Mimas is one of Saturn’s cutest moons. Its entire surface area is about the same as Spain, but its giant crater makes it look like the Death Star. And when NASA made a temperature map of Mimas, they found that the warmest region…
How the Inverted Yield Curve Reliably Predicts Recessions.
It’s what everybody’s talking about. Recession fears are rising. The spread between the two-year and the 10-year bond officially inverted for the first time since 2019, a sign that a recession could be on the horizon. It’s predicted every recession, reces…