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
Molecular dipoles
In chemistry, we’re going to see situations where a molecule, an entire molecule itself, might be neutral. But because of the differences in electronegativities and how the molecules are structured, you might have a partially positive charge on one side a…
Tom Preston Werner at Startup School 2012
Hi everyone! It’s awesome to be back here. Was here in 2010, two years ago. Lots changed since then. I’m actually gonna put this on the ground. This is my timer. You see, part of being a founder of a company is solving your own problems. So, I was thinki…
7 STOIC STRATEGIES TO MASTER YOUR EMOTIONS | STOICISM INSIGHTS
Welcome back to Stoicism Insights. Today, we’re diving into something truly special. Have you ever wondered how ancient Stoic philosophy can guide us through life’s toughest challenges? Well, get ready because we’re about to uncover seven profound Stoic l…
How To Make Millions In A Recession
What’s up guys, it’s Graham here. So, the other day I posted on Instagram about why I was not planning to make this video. In that post, I explained that I had made videos like this in the past; my thoughts and outlook on the markets have not changed, and…
Engineering with Origami
Engineers are turning to origami for inspiration for all types of applications, from medical devices to space applications, and even stopping bullets. But why is it that this ancient art of paper folding is so useful for modern engineering? Origami, liter…
A.I. Policy and Public Perception - Miles Brundage and Tim Hwang
Alright guys, I think the most important and pressing question is, now that cryptocurrency gets all the attention and AI is no longer the hottest thing of technology, how are you dealing with it? Yeah, Ben Hamner of Kaggle had a good line on this. He sai…