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
4th of July Fireworks Chemistry - Smarter Every Day 14
[Music] Hey, it’s me, Destin. So, uh, welcome to my 4th of July tradition. It’s something I do every year. I’m out here on the Bickering Nag, alone this year. Everybody else had something they had to do because the firework show is late. But anyway, I’m …
How a Shark Attack Survivor Invented Cage Diving
A lot of people would say you have got reason more than most to hate sharks, and yet you don’t. Can you explain it? It was in a spear fishing championship that I was the reigning champion. It was a six-hour competition. After four hours, many fish had …
Top 10 Most Expensive Suits In The World
Top 10 Most Expensive Suits in the World Welcome to A Lux, the place where future billionaires come to get inspired. Hey there, Alexis, and thanks for choosing to spend some time with us today. If you’re craving some facts and figures pertaining to the b…
Multivariable chain rule intuition
So, in the last video, I introduced this multi-variable chain rule, and here, I want to explain a loose intuition for why it’s true, why you would expect something like this to happen. The way you think about an expression like this, you have this multiv…
Preparing Homemade Jerky | Live Free or Die
So all these willows are gonna be really nice just to make like a little bit of a jerky rack. You don’t want too much bulk there ‘cause the jerky needs to dry fast. It’s nearly 60 degrees in southern Utah. At those temperatures, meat will spoil in as litt…
Cybersecurity and crime | Internet 101 | Computer Science | Khan Academy
[Music] Hi, my name is Jenny Martin and I’m the director of cyber security investigations at Semantic. Today, cyber crime causes huge problems for society, personally, financially, and even in matters of national security. Just in the last few years, hun…