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
See How Dog Sledding Helped This Photographer Get Her Spark Back | Short Film Showcase
A great photograph can make someone change their mind. People don’t know what they don’t know. They have their preconceived ideas; they’ll form an opinion of something that they’ve never really encountered. Sometimes, if a picture is powerful enough, it c…
MMOs in the Instagram Era: Highrise (S18) - YC Gaming Tech Talks 2020
Um, hi everybody! I’m Jimmy, I’m the co-founder and CTO of Pocket Worlds. We’re High-Rise, and we built High-Rise, the app which is available on iOS and Android. I think to date, it has over 5 million downloads, and we’re grossing over a million a month i…
Limitless with Chris Hemsworth | Official Trailer | Disney+
(Wind blowing) - You’re probably asking yourself why I’m dangling off a rope a thousand feet off the ground. I’m asking the same question. Well, Disney wanted to make a show about longevity. Turns out this has something to do with it. Here we go. (Dramat…
How Caleb Hammer Met His Girlfriend
How did you meet your girlfriend? Fish shop. Fish shop? Yeah, she was shopping for some shrimp. I was there looking for some puffer fish. She was very attractive, and I went up to her. I was like, “I like your glasses. Can I have your number?” You wen…
The Ponzi Factor - Short Trailer
When we think about the stock market, we think about money, the finance industry, businesses, and making money from investing in successful businesses. The belief is investing in successful businesses is what leads to investment profits, and there’s a dir…
Introduction to lipids | High school biology | Khan Academy
What we are going to do in this video is talk a little bit about lipids. Now, a lot of times, lipids are strongly associated with fats, and that’s not incorrect. Fats are lipids, but not all lipids are fats. A better definition, or a better association fo…