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
Why the Smart Money is Buying Alibaba Stock
So we’ve talked about the business. We’ve talked about the risks. Now I wanted to explore why our super investors are buying into Alibaba. So if you’ve been living under a rock, in Q1 Charlie Munger and Monish Pabrai were buying. Then in Q2, Monash Pabrai…
How to Build a 4K Editing Computer (More cores are not always better) - Smarter Every Day 202
Hey, it’s me Destin, welcome back to SmarterEveryDay. It’s coming up on 1 a.m. I have a problem in my life. It keeps me up at night, keeps me away from my family, which that’s the one that really bothers me. It’s rendering, look at this. This particular f…
Gamestop Stock CRASHES! But Who Won the Battle?
Well folks, what an amazing ride it has been! But it seems as though the Gamestop saga is finally drawing to a close. So in this video, what we’re going to be looking at is who were the winners and who were the losers out of this whole ordeal that saw Gam…
Worked example: estimating e_ using Lagrange error bound | AP Calculus BC | Khan Academy
Estimating e to the 1.45 using a Taylor polynomial about x equal 2, what is the least degree of the polynomial that assures an error smaller than 0.001? In general, if you see a situation like this where we’re talking about approximating a function with …
Casey Neistat and Matt Hackett on Live Video's Struggle for Interestingness
I mean, didn’t Google just announce last week some clip-on camera that captures what’s in front of you? In typical Google form, they pitched it though. It’s like this is the center of our AI learning platform about the world, which is the same marketing m…
Texas Teachers! Here's how to use TEKS-aligned unit guides on Khan Academy
Hello, I’m Jennifer, the Texas professional learning specialist with KH Academy and a former classroom teacher just like you. I am excited to introduce you to the unit guides available in our new TE aligned courses. These guides are designed to support e…