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
The Discovery That Transformed Pi
This video is about the ridiculous way we used to calculate Pi. For 2000 years, the most successful method was painstakingly slow and tedious, but then Isaac Newton came along and changed the game. You could say he speed-ran Pi, and I’m gonna show you how…
How to Not Become A Man-Child (or Woman-Child)
We live in an era of adult-children: everybody wants freedom, but nobody wants responsibility. But, the truth is, you can’t have freedom without taking personal responsibility for your own needs. Wanna live on your own? You have to be responsible for co…
Emotional Manipulation: A Masked Reality
Manipulation is everywhere. The social influence aimed at changing the behavior or belief of a person through emotional coercion. Emotional manipulation has always been prevalent in human interaction. It’s in all of our relationships. Companies use it on …
Gathering Greens | Life Below Zero
You ready, bun? I got to flip over my shoes so they don’t get rained on. The hailstones spend their summer along the Koic River, where they only have a brief window to gather resources before the freeze returns. For Chip and Agnes, teaching their daughter…
YC Partner AMA at the Female Founders Conference
Hello everyone, my name is Sharon Pope. I’m the head of marketing programs at Y Combinator, and it is my pleasure to welcome back to the stage YC’s partners coming up: Catman, y’all, Ik, Kirstie, Nephew, Adora, Polly, Jessica, and Carolyn. I’m gonna stand…
Federal and state powers and the Tenth and Fourteenth Amendments | Khan Academy
What we’re going to do in this video is talk a little bit more about federal powers versus state powers. As we’ve mentioned in other videos, this is a very relevant topic because even today you’ll have supreme court decisions being decided based on citing…