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
Karn Saroya on the Capital-Light Way to Start an Insurance Business
All right, and so today we have Karnes Roya, the CEO of Cover, which was in the Winter 2016 batch of YC. So, Karnes, what does Cover do for us? “All, thanks for hosting me! I appreciate it. So, you can think of Cover as a multi-line national property ins…
Pompeii: New Studies Reveal Secrets From a Dead City | National Geographic
A there was in that moment, 79 AD was really, I can say, the place to be, but was really an important, important our little but important town. Inside the cast are the skeletons of these people. So these are just a human being of debt population living 2,…
Safari Live - Day 206 | National Geographic
This program features live coverage of an African safari and may include animal kills and caucuses. Viewer discretion is advised. Good afternoon and welcome to a stripey start to our sunset Safari on a rather windy afternoon. It is a little bit breezy, Ar…
New York Banning Bitcoin Mining? | DC Blockchain summit 2022
[Music] [Music] Kevin, let’s start off with stable coins. So, this has been a huge topic of conversation recently. We saw Luna that was 60 billion dollars at its peak, that turned into a failure. So what can we do with the stablecoin ecosystem to continu…
Exclusive: A Conversation with Alex Honnold and Co-Directors of “Free Solo” | National Geographic
I definitely have a fear of death, same as anybody else, and I would very much like to not die while climbing. You know, I was this huge, huge wall. But all it takes is one move that doesn’t feel right for you not to be able to do it. Maybe in 2015, I st…
The Cognitive Tradeoff Hypothesis
This is Inuyama, Japan, a historic city home to Japan’s oldest original wooden castle. It is also home to Kyoto University’s Primate Research Institute. Here, a group of chimpanzees have been trained to play a game that exposes something shocking about th…