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
Frederick Douglass and Abraham Lincoln: Two Leaders | National Geographic
ROBERTS: This is a story of an unlikely friendship that transformed America forever. (theme music plays) ♪ Wade in the water ♪ ♪ Wade in the water ♪ ♪ Wade in the water ♪ ♪ God’s gonna trouble the water ♪ ♪ Wade in the water ♪ ♪ Wade in the water ch…
Safari Live - Day 142 | National Geographic
This program features live coverage of an African safari and may include animal kills and carcasses. Viewer discretion is advised. Good afternoon and welcome to the Sunset Safari 2.0! My name is Taylor McCurdy, and on camera with me today is Senzo. Of co…
EXCLUSIVE: "Glowing" Sea Turtle Discovered | National Geographic
Wait, what did you find? We found a biofluorescent turtle! The scientists have only really tuned in to biofluorescence in the last 10 years, and as soon as we started tuning into it, we started to find it everywhere. First, it was in corals and jellyfish…
Life Unlocks After These 15 Changes
92% of people want change. Every year, 76% of people die with the regret of allowing life to pass them by. Average job. Average home. Average partner. Despite nobody starting off looking for average yet, they still end up there. By the end of this video, …
Neil deGrasse Tyson Talks Life on Mars | StarTalk
Uh, Larry Wour had a question for me. He was—he was like totally there too. Let’s find out. So, let me ask you this: um, Mars, is there a possibility that there could have been— I don’t mean microbial life, but I mean actual intelligent, like human life …
Is Our World Broken?
Being a human in the 21st century often feels frustrating. We are clearly at the high point of our species – never have so many of us lived so well, been so healthy and well off. At the same time, life is incredibly hard – more than 15 thousand children d…