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
Can You Picture That? This Photographer Can and Does | Podcast | Overheard at National Geographic
Foreign [Music] November 2nd, and I am getting into my Tyvek suit. So, because bats carry diseases that we don’t know about, we have to wear PPE. And we all know about PPE because of COVID. So that’s Mark Thiessen. He’s a staff photographer for National G…
Warren Buffett | Getting Rich is Easy
Speaker: Feel that they have to create a dynasty or anything, and they give it back to society, and a great many do it anonymously. They do it in many states to some extent. We see a little, some concentration of it in Nebraska because, uh, they generally…
Binomial variables | Random variables | AP Statistics | Khan Academy
What we’re going to do in this video is talk about a special class of random variables known as binomial variables. As we will see as we build up our understanding of them, not only are they interesting in their own right, but there’s a lot of very powerf…
Letter from a Birmingham Jail | US government and civics | Khan Academy
What we’re going to read together in this video is what has become known as Martin Luther King’s “Letter from a Birmingham Jail,” which he wrote from a jail cell in 1963 after he and several of his associates were arrested in Birmingham, Alabama, as they …
I bought a Tesla Cybertruck for $100
What’s up you guys? It’s Graham here. So yeah, I did a thing last night. After watching non-stop videos, reading non-stop articles, and researching every aspect of this fine, odd piece of machinery, I decided to reserve a spot to order the upcoming Tesla …
How Much I Make From YouTube #shorts
Hey, so for anyone curious how much I make on YouTube with three and a half million subscribers, here you go. I’ll take you into my analytics. So, in total, we did 110 million views this year, and as you can see, the views every day range anywhere from a…