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
We WILL Fix Climate Change!
Our home is burning. Rapid climate change is destabilizing our world. It seems our emissions will not fall quickly enough to avoid runaway warming, and we may soon hit tipping points that will lead to the collapse of ecosystems and our civilization. While…
How much does it cost to run a private jet?
Hey Steve, I’m thinking about buying my first jet, but I’m worried about operation costs. Could you tell me a little more about that? Because the operating costs are obviously the main thing you have to worry about after you own an airplane. It depends o…
What’s Your Personality Type? | An Introduction to the Enneagram
The Enneagram of Personality is a system used by numerous mental health professionals to get more insight into one’s character, and as a method for self-development. The Enneagram consists of nine personality archetypes that are interconnected in differen…
When Life Hurts, Stop Clinging to It | The Philosophy of Epictetus
Our very sense of wellbeing is at gunpoint when we cling to the fickle, unreliable outside world. Around two thousand years ago, Stoic philosopher Epictetus observed that people are burdened and dragged down because they tend to care about too many things…
What the Ice Gets, the Ice Keeps | Podcast | Overheard at National Geographic
Foreign large ice floors in the first months of 2022, Esther Horvath sailed through the frigid waters of the Weddell Sea off the coast of Antarctica. Esther’s a photographer, and she was documenting life aboard a research ship that can break through ice s…
Your Hidden Superpower
We’ve heard rumors of a chosen one. A special birb who has the power to illuminate the vast darkness of the universe, uncovering the great mysteries of the world. We are all born with this power. But only a few are able to master it. We use the same powe…