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
How Close Are We to Flying Cars? | How Sci-Fi Inspired Science
You’re stuck on the highway, bumper-to-bumper traffic. A commute that should have taken a few minutes has now somehow become an hour-long endeavor. And this happens. We all have one of two thoughts: one, monster truck; or two, wish I could just fly over t…
NFTs Will Be Bigger Than Bitcoin! | ft. guest shark Kevin Hart!
What are the one or two things that are necessary, um, for a software platform to succeed at scale? You mentioned speed, but what are some of the qualities that are necessary, um, for one of these platforms to win? You know, what in the end of the day det…
Howard Marks: The BIGGEST Investment Opportunity in 40 Years
53 years in your investing career, there have been three sea changes, and we are in one of them. What does that mean? Howard Marks, he is a billionaire and one of the most highly respected investors in the world. Marks has been investing for over 50 years…
Back In Action | Big Fish Texas
What’s happening? Boys trying to show this boy out on tightrope? Make you figure out you mean you’re doing nothing. Okay, I’m waiting on parts right now. Thank you. Much stuff, there’s plenty of cleaning. There’s lots of stuff doing their cleaning. Don’t …
Expanding a Cabin in the Arctic | Life Below Zero
Nothing’s going to stop me. Snow, wind, 40 below, things like that don’t stop me. [Music] Couldn’t be any better time to finish this up. Dogs are all resting. Well, now it’s time to keep after it. I don’t want to leave this undone and wait because this is…
Meta's Moment of Truth (Facebook's Ad Problem Explained)
Mark Zuckerberg is dark in the door of Capitol Hill. Facebook is scrambling to contain the fallout; it’s facing a real threat to its cultural relevance. Do you think, in the wake of all these revelations, Facebook’s gonna make any changes? It is an extra…