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
Should This Lake Exist?
This is the largest body of water in California. It is about 25 kilometers wide by 55 kilometers long. You can’t even see the other end of this lake. And it is home to the most diverse number of birds anywhere in the continental US besides Big Bend in Tex…
How a 22 year old got 500 LISTINGS as a PART TIME Real Estate Agent
In my first year, I have these moments where I wanted to quit. I was just like, this is not for me, you know? Maybe real estate’s not for me. Maybe I got so frustrated. I was helping this dude out, and then like halfway through, he’s like, you know what? …
Buoyancy Quiz
We are doing a buoyancy experiment today. If you drop a golf ball into some dishwashing liquid, it sinks very slowly. So why does it sink in the detergent? Because the golf ball is more heavy than the liquid that’s in the container— then the detergent. W…
The CEO Who Pays Employees to De-Locate From the Bay
I haven’t started with questions from Twitter before, but I feel like they kind of covered some of the initial ones I wanted to go off with, uh-huh. So maybe we should just go with those. All right, so the first one was from Ben Thompson, and he asked fo…
The ULTIMATE Beginner's Guide to Investing in Real Estate Step-By-Step
What’s up you guys! It’s Graham here. So, this video is really meant to be a real estate beginner tutorial where I can really cover the basics and outline the blueprints of exactly what’s needed in order to prepare for and actually invest in real estate. …
Steve Jobs' 2005 Stanford Commencement Address (with intro by President John Hennessy)
[Music] This program is brought to you by Stanford University. Please visit us at stanford.edu. It now gives me great pleasure to introduce this year’s commencement speaker, Steve Jobs. [Applause] The chief executive officer and co-founder of Apple and …