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
Andrea Ghez’s Black Hole Research Confirms Einstein’s Theory of Relativity | Short Film Showcase
Black holes are deceptively simple and yet incredibly complex. A black hole is a region of space where the pull of gravity is so intense that nothing can escape, not even light. We don’t have the physics to describe what a black hole is because it leads t…
Help Khan Academy Double Down On Our Efforts
Hi everyone, Sal Khan here from Khan Academy, and I just wanted to remind you that if you’re in the position to do so, to think about making a donation to Khan Academy. We are a not-for-profit organization, and we can only exist through donations from fol…
Michael Seibel - How to Plan an MVP
My name is Michael. Uh, I work here at Y Combinator. I helped run the accelerator. Uh, before that, I did two YC startups—one in 2007 and one in 2012. Today, I’m going to talk to you about a minimum viable product, so MVP. We always yell at founders to n…
This Taxi Driver Has an Amazing Life Story You'll Want to Hear | Short Film Showcase
I’ve been cab driver in Chicago around 12 years. I do the job like 12 hours a day. Every day I work because I have four kids. I have to support my kids and my family, and all the time I thank this country because they bring me as the refugees to this coun…
Strategies for subtracting more complex decimals with tenths
Some more examples subtracting decimals. So let’s say we want to figure out what 2 - 1.2 is. Pause this video and see if you can calculate this. So, there’s multiple ways to tackle this. One way is you could say, look, this is the same thing as 2 - 1, 2 …
Predator-prey population cycles | Ecology and natural systems | High school biology | Khan Academy
What I want to do in this video is think about how different populations that share the same ecosystem can interact with each other and actually provide a feedback loop on each other. There are many cases of this, but the most cited general example is the…