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
Gisele Bündchen: Why I'm Involved | Years of Living Dangerously
I think it’s important for people to take notice about climate change because it is important for our survival. It’s important for everyone’s life. I want to do something now before it’s too late, and that’s why I’m doing this documentary. Quite frankly,…
Turbulent Flow is MORE Awesome Than Laminar Flow
A portion of this video was sponsored by Cottonelle. This is like a scientist trap. It certainly is; case in point, that is Space Station commander Chris Hadfield. What this isn’t is turbulent. Nope, this is largely laminar flow. “Did somebody say peculia…
Interwoven | Vocabulary | Khan Academy
I’ve got a twisted tale to tell you in this video, wordsmiths, because the word I want to talk about is interwoven. Interwoven, it’s an adjective, and it means twisted or joined together. It has a literal meaning, like two fibers woven into the same carpe…
NEW Tudor Watches 2024
Something happens. I don’t, I don’t know what to tell you. It just, in the watch world, when something gets hot, it gets hot, and nobody can really put the finger on why. What’s hotter than Tudor? Nothing! [Music] [Music] [Applause] Okay! Mr. Wonderfu…
Nuclear fission | Physics | Khan Academy
An atomic bomb and a nuclear power plant work on the same basic principle: nuclear fusion chain reactions. But what exactly is this? More importantly, if the same thing is happening inside both a bomb and a nuclear reactor, then why doesn’t the nuclear re…
Backcountry Basics: Navigating With or Without Technology | Get Out: A Guide to Adventure
My name is Hillary O’Neal and I am a professional ski mountaineer and adventurer. Today, we are going to talk about backcountry navigation. There are a lot of uses in many different environments that would require some level of skill in backcountry naviga…