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
Watch: What It’s Like to Read Lips | Short Film Showcase
So, when I was really young, probably kindergarten or first grade, I have a much older brother, and we’d go out to recess. There was this older guy; he might have been in like fifth or sixth grade. They’d always used to pick on us, and I didn’t really kno…
The For You Page Has Ruined Society Forever
Every choice you’ve ever made is a result of the combination of all the experiences you’ve had, things you’ve learned, and people you’ve met. So, what happens when an algorithm designed to make the most money for corporations decides the experiences you h…
Analyzing a cumulative relative frequency graph | AP Statistics | Khan Academy
Nutritionists measured the sugar content in grams for 32 drinks at Starbucks. A cumulative relative frequency graph—let me underline that—a cumulative relative frequency graph for the data is shown below. So they have different amounts of sugar in grams …
How to Win (100 Cheat-codes for Life)
This video will change your life. Watch it as many times as you need. You’ll realize you hear something new every single time. Here are 100 cheat codes for winning at life. Welcome to alux.com, the place where future billionaires come to get inspired. You…
Death & Dynasties
Rulers are often related, with power passing from member to member, forming a dynasty. This occurs not just with royalty or dictators, but also with representatives in a democracy. Families frequently pass power or compete with other families for a turn a…
How to Stick To Your Goals - A Quick Guide
[Music] Hey, what’s up? Imagine you’re a farmer and you’re really, really excited about planting a new carrot garden. You picture this in your mind: a field full of juicy carrots. You can give all these carrots to your friends. You want to be known as th…