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
Spend More Time Making the Big Decisions
Uh, best piece of advice for someone 24 or a new Millennial, uh, out of college, I would say, you know, just spend more time on making the big decisions. There’s basically three really big decisions that you make around that age: it’s where you live, who…
Resistivity experimentally determined
A group of students prepares a large batch of conductive dough, a soft substance that can conduct electricity, and then molds the dough into several cylinders with various cross-sectional areas (A) and lengths (L). Each student applies a potential differe…
Office Hours at Startup School NY 2014
So next up, all right, Gary Tan and I are going to do onstage office hours. This is most of what happens during Y.C. The partners meet individually with startups, and we give them advice about whatever problems they’re facing. It’s usually 25 minutes per …
Opiates and Pangolin Scales is Rumor Debunked | National Geographic
(upbeat music) [Rachel] Pangolins are a really unique group of mammals. They are covered with these scales that are made of keratin, which is the same material as human finger nails. And it’s those scales that are in high demand, and it’s driving a lot o…
Why Laminar Flow is AWESOME - Smarter Every Day 208
Hey, it’s me Destin, welcome back to Smarter Every Day. I love laminar flow. And people send me tweets about laminar flow all over the internet. It’s time to do the laminar flow video. Check this out, big pool. We’re going to see if we can make laminar fl…
CREEPY WOODY !!! -- IMG! #31
Creepy Woody and this place is great for kids. Wait… It’s episode 31 of IMG! Parents are awesome, except when they play favorites. And here’s Bert in real life. There won’t be any cats in this episode, but there will be zombie jean shorts, rigor mortis gi…