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
The 7 Money Traps That Keep You Poor
What’s up you guys? It’s Graham here. So, no surprise, investing throughout this last year has been one of the most eye-opening experiences for so many people in a very long time. In a span of 365 days, we’ve seen some of the worst single-day point drops …
The Market Is About To Drop - Again
What’s up, grandma’s guys? Here, so throughout the last few days, there’s been a new topic that’s begun to make its way around the internet, and we got to break this down because it’s from the renowned investor Ray Dalio, with some rather serious claims t…
Safari Live - Day 146 | National Geographic
Viewer discretion is advised. Good afternoon, everybody, and welcome to the Sunday Sunsets of Fari: a quiet contemplation of the week that was and the week that is to come. We have some starlings: they’re a mixed flock of Greater Blue Eared and Cape Gloss…
See How Life Has Changed in the Middle East Over 58 Years | Short Film Showcase
That’s right across the Lebanese Syrian border. I stopped, pulled out my camera because I had resolved that the entire time I was in the Middle East, that I was going to keep a detailed photographic record of all my landscapes and have a real collection o…
Worked example: Calculating equilibrium concentrations from initial concentrations | Khan Academy
For the reaction bromine gas plus chlorine gas goes to BrCl, Kc is equal to 7.0 at 400 Kelvin. If the initial concentration of bromine is 0.60 Molar and the initial concentration of chlorine is also 0.60 Molar, our goal is to calculate the equilibrium con…
Future Founders Conference for Women Globally
[Music] We are all excited to have you here at our very first Future Founders Conference for Women. We believe that creating a platform where successful women can share their stories and advice is one way to bring about even more successful women-led busi…