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
Walking Alone in the Wilderness: A Story of Survival (Part 3) | Nat Geo Live
So on my foraging journey, I met this one. It’s pure sugar. Imagine, when you are out there, starving, and suddenly there is sugar. In the middle of that little thing there, you’ve got little insects. The insects build a little house, and inside is pure s…
Once You Get Money Upgrade These 15 Things Immediately
They lied to you. They told you to get the fast car, the diamond chain, the mansion. But deep down, you know those are just marketing campaigns to separate you from your hard-earned money. Do that, and you’ll be back to being broke in no time. But there a…
#shorts
Here’s a day in the life of a private jet broker. I arrived at the office at 7:00 a.m. to respond to some important emails from Hong Kong and Dubai, ensuring they were received within their working hours. Being on time builds trust and keeps things runni…
Worked example: limit comparison test | Series | AP Calculus BC | Khan Academy
So we’re given a series here and they say what series should we use in the limit comparison test. Let me underline that: the limit comparison test in order to determine whether ( S ) converges. So let’s just remind ourselves about the limit comparison te…
Welcome to Financial Literacy! | Financial Literacy | Khan Academy
Hi everyone! Sal Cotton here from Khan Academy, and I just wanted to introduce you and welcome you to our financial literacy course. Why financial literacy? Well, money is everywhere, and if you don’t understand money, it can easily take control of your …
Khan Academy's Content
This video will review the available content on Khan Academy and discuss how our courses are designed to help students master the content they’re learning. When learners interact with Khan Academy, they will experience videos, articles, practice questions…