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
Intercepting an Ecstasy Shipment | To Catch A Smuggler
[music playing] - There’s a bunch of packages in here from the Netherlands. So we’re looking for narcotics. Anywhere in Europe are pretty good packages to check. So here we have Great Britain. This one looks good. This is a package from the UK. It’s can…
Charlie Munger's Alibaba Confession at the Daily Journal Annual Meeting (2023)
This video is sponsored by Morning Brew. Sign up to their free daily newsletter via the link in the description. I regret Alibaba’s one of the worst mistakes I ever made. I got over charmed by the people who were leading in the online retailing, and I di…
Kirsty Nathoo with Shan-Lyn Ma, Founder of Zola
Okay, hi everybody. I’m Kirsty Nathu. I’m one of the partners at Y Combinator, and it is my great honor to introduce Shanna Lynn, MA, who’s the CEO of Zola. Zola has reinvented the wedding gift registry, and they’ve now worked with hundreds of thousands o…
The Challenges with Cancer Trials | Breakthrough
ANDRE CHOULIKA: We didn’t have any intention of injecting these type of vials to patient because we needed a lot of vials to be able to file our clinical trial application. And this was planned to be done with the University College London. NARRATOR: Bef…
Westward expansion: social and cultural development | AP US History | Khan Academy
[Instructor] In other videos, we’ve discussed the causes and effects of westward expansion in the 19th century, focusing on the period that began with the discovery of gold in California in 1849 and ending shortly after the Civil War. But westward expan…
How Many Stocks Should Be In Your Portfolio? (Buffett, Lynch, Pabrai Explain)
We think diversification is a practice that generally makes very little sense for anyone that knows what they’re doing. Uh, diversification is a protection against ignorance. [Music] This video is sponsored by Hypercharts. Sign up to Hypercharts using the…