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
Lewis diagrams | Atoms, isotopes, and ions | High school chemistry | Khan Academy
In this video, we’re going to introduce ourselves to a new way of visualizing atoms. As you can imagine from the title here, that’s going to be Lewis diagrams. But before I even get into that, let’s do a little bit of review of what we already know about …
Why Is Yawning Contagious?
Hey, Vsauce. Michael here. And today we’re going to talk about yawning. Why do we yawn and why is yawning contagious? How come when I see someone yawn or even think about it, it makes me kinda of want to yawn? First things first, definitions. When you y…
The Secret City inside of London Revealed
The Great City of London, known for its historical landmarks, modern skyscrapers, ancient markets, and famous bridges. It’s arguably the financial capital of the world and home to over eleven thousand people. Wait, what? Eleven… thousand? That’s right: bu…
Staying at a hotel-Dinner at Nobu restaurant vlog with my mom🇯🇵
Hi, guys, it’s me, Ruri. Today, my mother and I came to a hotel to celebrate my first 1 million viewed video. I decided to book a hotel and a fancy Japanese dinner to thank my mom for supporting me. Okay, so here we have our bathroom, toilet, and shower,…
Adora Cheung
Hello, um, my name is Justin Khan. I’m one of the partners at YC, and I’m extremely excited to introduce our next speaker, Adora Chung. Uh, Adora is the founder and CEO of Homejoy and one of our top companies that we’ve funded. Um, I’m particularly excit…
Aoife O'Sullivan: Expert Aviation Lawyer Reveals All
Hi, I’m Steve Varzano with the Jet Business in London, and we’re here today to start with episode one of an interview about the aviation industry. Today, I have with me IFA O’Sullivan from the Air Law Firm. She is one of the most notorious expert aviation…