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
WHICH PLAYER SHOULD I CHANGE? | Maresca hits back at calls for more Chelsea substitutes
Must proved a very frustrating end to the afternoon for you, and what does it tell you about your Chelsea team? No, yeah, as I said, I just said that probably we did enough to win the game today. Between the first half and second half, I think we created…
Similar shapes & transformations
[Instructor] We are told that Shui concluded the quadrilaterals, these two over here, have four pairs of congruent corresponding angles. We can see these right over there. And so, based on that, she concludes that the figures are similar. What error, if a…
Dot Com Makes Good | Wicked Tuna
We’re gonna go over to Dave and check his fish out. Steam it, steam it, baby! You having fun yet? Huh? Yeah, huh? This is no round just drive-bys, right? We mark that man big. The meat is pink, beautiful! Here, we’re gonna make a lot of money here. Till …
Vortex Shedding - Smarter Every Day 23
[Engines screaming] Hey, it’s me, Destin. We’re at an airshow. So today I’m going to teach you about vortex shedding. [Music] Engines screaming YEAH! (Destin) Fly… flying our airplanes. Engine roaring I can’t hear you. Why does the smoke come out of the a…
15 Lessons Rich Parents Teach Their Kids
The right piece of advice at the right time can make great differences in the long run. The kids of the rich have a massive head start, not because of the resources they already have, but because of the mindset their parents instill within them. They star…
Changes in the AD-AS Model and the Phillips curve | APⓇ Macroeconomics | Khan Academy
In this video, we’re going to build on what we already know about aggregate demand and aggregate supply and the Phillips curve, and we’re going to connect these ideas. So first, the Phillips curve. This is a typical Phillips curve for an economy. High in…