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
15 Books Steve Jobs Thought Everyone Should Read
Fifteen books Steve Jobs thought everyone should read. Welcome to a Lux Calm, the place where future billionaires come to get inspired. Hello A Luxors! We hope you’re having a great week so far because you’re about to receive something that’ll make it ev…
Researching How to Live With Coyotes | Short Film Showcase
[Applause] [Music] Into a security guard arm one. No, I was raised in Wyoming, a large commercial sheep operation. We had probably about 4,000 head of sheep that ranged on the public lands in Wyoming. One of my jobs as a kid when I was growing up there w…
YC Tech Talks: Climate Tech with Charge Robotics (S21), Wright Electric (W17) and Impossible Mining
[Music] I’m Paige Amora. I work at Y Combinator. I’m on our work at a startup team, so we’re the team that helps our portfolio companies hire. For this event, we’ll do three tech talks. These will just be about a technical topic that the founders find int…
Worked example: problem involving definite integral (algebraic) | AP Calculus AB | Khan Academy
We are told the population of a town grows at a rate of ( e^{1.2t} - 2t ) people per year, where ( t ) is the number of years. At ( t = 2 ) years, the town has fifteen hundred people. So first, they ask us approximately by how many people does the popula…
Reading tables 2
The table below shows the number of chickens sold by four friends from January to March. Except one entry is missing. What number should go in the empty cell? So, let’s see. This is the empty cell right over here they haven’t filled out. How many? Let’s …
Worked example: Calculating molar mass and number of moles | AP Chemistry | Khan Academy
We are asked to calculate the number of moles in a 1.52 kilogram sample of glucose. So, like always, pause this video and try to figure this out on your own. This periodic table of elements will prove useful. All right. Now, if we’re trying to figure out…