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
Safari Live - Day 170 | National Geographic
This program features live coverage of an African safari and may include animal kills and carcasses. Viewer discretion is advised. Well, good afternoon everybody once again and welcome aboard on the sunset Safari. My name is Ralph Kirsten and on the bush…
Optimistic in India | Years of Living Dangerously
I was told that if I wanted to see how the US will play a part in India’s energy future, I should come here—a coal power plant, believe it or not, erected right in the middle of Delhi. Mr. Ambassador, nice to meet you. Nice to meet you. I love the movie …
He Spent His Career Studying a Frog. Then He Discovered Its True Identity. | Short Film Showcase
[Music] So, after all the different tree frogs, there is one group that really captivated my interest, and that was the leaf frogs. You can just imagine seeing one of those in the wild; it’s just incredible. You know, the great big eyes open, they’ve got …
Scaling functions introduction | Transformations of functions | Algebra 2 | Khan Academy
So this is a screenshot of Desmos. It’s an online graphing calculator. What we’re going to do is use it to understand how we can go about scaling functions, and I encourage you to go to Desmos and try it on your own, either during this video or after. Le…
Why Your Dark Side Is Your Friend (Jungian Philosophy) | STOICISM
In every one of us, there lurks such a dark beast, a sinister shadow waiting to be acknowledged. This shadow, often ignored, is packed with uncharted feelings and suppressed thoughts that can surprisingly enlighten and empower us. Stoicism teaches us the …
Alligator Moms Are Nature's Helicopter Parents | National Geographic
[music playing] NARRATOR: What would you do if you could not chew? Did Dr. Seuss write this script or maybe Roald Dahl? [singing] What would you do if you could not chew? Simple. You just thrash your food apart. Alligators go through 2,000 to 3,000 tee…