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
Risking My Life To Settle A Physics Debate
This propeller craft was built to settle a physics debate because what its creators claim it can do is so counterintuitive that it seems to violate the law of conservation of energy. So I’ve come here to drive it myself and see if it really works. And is …
The importance of networking.
This is the day in the life of a jet broker. I flew out to Switzerland for eBay. For anyone who loves jets, eBay is like being a kid in the candy store. It’s where you’ll find the latest and greatest in jet innovations while providing unparalleled network…
Sine and Cosine come from circles
Now I’m going to clear off the screen here, and we’re going to talk about the shape of the sign function. Let’s do that. This is a plot of the sign function, where the angle Theta—this is the Theta axis in this plot—where Theta has been plotted out on a s…
Bank Failures Are Coming (Do This ASAP)
What’s up you guys? It’s Graham here, and it looks like it’s happening again. Not even a year after the failure of Silicon Valley, Signature, and First Republic Bank, another storm seems to be brewing. And no, I’m not talking about the insane amount of ra…
Doing donuts in $150k+ cars…on the front lawn
[Music] Let me show my hair first. What’s up you guys? Brendan. So, I’m so excited this morning! I am on my way to Frank Out, he’s OC, a private car. If it’s working, backyard. He has an insanely cool house in the middle of Los Angeles, and the inside ya…
Integration by parts: definite integrals | AP Calculus BC | Khan Academy
Going to do in this video is try to evaluate the definite integral from 0 to pi of x cosine of x dx. Like always, pause this video and see if you can evaluate it yourself. Well, when you immediately look at this, it’s not obvious how you just straight up…