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 Leadership Decisions That Can Make or Break Your Future
Are you a leader in your life? Leadership isn’t just about making bold moves in the boardroom. Okay, you might have a vision for your financial goals, your mental and physical health, your relationships, your education, and just your overall lifestyle. Bu…
Peter Lynch Talks About His Secret to Success in the Stock Market
When I was writing Magellan, one out of every 100 Americans was in the fund. Yeah, these are people that five thousand dollars and ten thousand dollars was a huge deal too. So when the market went down, you felt really badly. I mean, it’s really the press…
The Progressives | Period 7: 1890-1945 | AP US History | Khan Academy
After the Civil War, there were enormous changes in American life, with industrialization, urbanization, and immigration changing the composition of who lived in the United States, where they lived, and what they did for a living. But city living and fact…
You Swallowed a Tapeworm – What Now? #kurzgesagt #shorts
BL, you swallowed a tapeworm by accident. What now? Maybe you ate infected raw meat, or perhaps you drank contaminated water. Well, that’s less important now; they’re in your body. How bad it might get depends on whether it’s a lava or an egg. Option on…
Welcome to Earth | Official Trailer #2 | Disney+
(Adventurous music) - [Will] I’m throwing myself into the unknown. - I almost guarantee you’re going to survive. - Am I? (Will laughing) (Adventurous music continues) - [Will] There’s a new breed of explorers taking me to the ends of the earth to discover…
Career trajectories are non-linear.
So this question is: What is the best advice you’ve ever received? Career trajectories are not linear. Especially if you start a company, you might actually bypass a bunch of things, but it might not feel that in the moment. A lot of people that start st…