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
Safari Live - Day 316 | National Geographic
This program features live coverage of an African safari and may include animal kills and carcasses. Viewer discretion is advised. Good afternoon, everybody! Welcome to Juma in the Sabi Sands in South Africa, where we have found a beautiful European roll…
Tech startups live and die by their speed of shipping software.
I was the single non-technical person on a four-person co-founding team at Justin TV and Twitch. And like, I’ll just make it plain: without my three other co-founders, none of that happens. Ideas are a dime a dozen. I think that more business people need…
Khan Academy India Talent Search 2017
Hi, I’m Sal Khan, founder of the Khan Academy, and I just want to let you know about our India talent search. As you might know, Khan Academy, we’re a not-for-profit with a mission of providing a free, world-class education for anyone, anywhere. To us, t…
The Future of Driving | Years of Living Dangerously
TY BURRELL: Now that I’ve learned self-driving cars aren’t that far off, what about ride sharing? Are companies like Lyft and Uber going to be part of the solution? How you doing? All right? What are the odds? You are John Zimmer, President of Lyft. You g…
2015 AP Chemistry free response 6 | Studying for the AP Chemistry exam? | Chemistry | Khan Academy
A student learns that ionic compounds have significant covalent character when a cation has a polarizing effect on a large anion. So what are they talking about? So if I have a cation, so this is my cation, and then this is my large anion, my large anion…
Measuring angles with a circular protractor | Math | 4th grade | Khan Academy
Measure the angle in degrees. So here we have this blue angle that we want to measure in degrees, and it’s sitting on top of this circle. That circle is actually a protractor. Sometimes we see, and maybe what you’re used to seeing, is protractors that are…