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
Alibaba Stock Keeps Dropping... Delisting Risk Intensifies?
Okay, there have been a lot of questions and comments about Alibaba lately. So, in this video, I want to talk about what’s going on and why this stock continues to slide further despite being quite undervalued already. I mean, the one-year chart shows now…
TIL: We Could Give Mars Our "Cooties" | Today I Learned
Human beings are really dangerous to the surface of Mars. Let’s say life did exist on the surface of Mars; would it be able to withstand the bacteria, the viruses, all of the bad things that we have on Earth, without having the protection? Because it’s ne…
Taoist Wisdom For Inner Peace
Taoism is an ancient Chinese mystical, philosophical, and religious tradition that emphasizes living in agreement with the Tao. The main work in Taoism is the Tao Te Ching, created by a mysterious author called Lao Tzu, which contains profound wisdom and …
Credit Card LifeHack: How to travel anywhere for FREE with just a few minutes of work
What’s up you guys, it’s Graham here. So, one of the things I’ve been doing for fun on the side is racking up credit card points. Over the last few years, I basically have been able to fly to Canada to visit family entirely for free, just by opening up a …
See What Canyon Life Is Like for a Navajo Pageant Winner | Short Film Showcase
He hey! [Music] I read your status last night. You posted that someone else was holding you tight. Hey, hey! 1, 2! [Applause] 3! We y because it makes the spirits hear us, that we’re here in the canyon. The spirits in the ruins should know people are go…
How Confidence Is Holding You Back
Hello Alexa, welcome back. Let’s be real here for a moment. Everything that is worth doing and everything that is worth getting needs a healthy dose of something that today’s society doesn’t really have anymore. And that thing is courage. The courage to …