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
Звездообразование в галактиках. Интервью с итальянским астрономом
[Music] Astronomy. The first question: Your work has been published in a very important magazine. It’s well, usually it places really important works. So could you explain why is it so important? Because, as I understand, you observed the situation when s…
This 1960s Group Empowered Black Youth in Brooklyn | National Geographic
Bed-Stuy youth in action with a youth organization that was established in the ‘60s. They would have these activities that would provide young people with a sense of empowerment, and they were engaged with their community. That was the other thing—there w…
Kat Manalac's Whale AMA
We usually let the startups in each batch decide when they want to launch. Um, so most of the startups in the winter ‘17 batch haven’t announced yet. But, um, there is one female founder who has announced her company. Um, it’s called Simple Habit. It is a…
Finding inverse functions: radical | Mathematics III | High School Math | Khan Academy
[Voiceover] So we’re told that h of x is equal to the negative cube root of three x minus six plus 12. And what we wanna figure out is, what is the inverse of h? So what is… What is h inverse of x going to be equal to? And like always, pause the video and…
The Infinadeck Omnidirectional Treadmill - Smarter Every Day 192 (VR Series)
Hey, it’s me, Destin. Welcome back to Smarter Every Day. A treadmill is a pretty simple device, right? You set the speed you want; you get on, you start moving. But you don’t actually go anywhere. This technology people have realized for a really long tim…
16 STOIC SECRETS TO AVOID BEING MANIPULATED | MARCUS AURELIUS | STOICISM
Life can sometimes feel like a maze of relationships, a never-ending journey filled with twists and turns. But have you ever wondered if the people in your life are genuinely there for you or just taking advantage of your kindness? I’ve been there, and I …