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
She Fears Her Tribe's Story Will Be Forgotten | Short Film Showcase
[Music] What keeps you up at night? For me, it’s many things, but I probably share the same worries as you do about the future— the uncertainty of the path before me. But I’ll never forget what told me: that there’s always a story behind everything, behin…
The Remarkable Story Behind The Most Important Algorithm Of All Time
This is a video about the most important algorithm of all time, the Fast Fourier Transform or FFT. I mean, you use it all the time, including right now to watch this video, and it’s used in radar and sonar, 5G and WiFi. Basically, anytime a signal is proc…
Safari Live - Day 340 | National Geographic
This program features live coverage of an African safari and may include animal kills and carcasses. Viewer discretion is advised. A very good afternoon to you all far and wide from the Maasai Mara here in Kenya. We have a lioness over there. My name’s L…
What we've learned in 100 Episodes - Smarter Every Day 100!!
[party whistles] Hey it’s me Destin. Welcome back to Smarter Every Day. A very special Smarter Every Day. The 100th episode, but not only that, it kind of coincided with a million subscribers, so thank you very much for your support. And because of that, …
Shower Thoughts That Make Me Question Everything
I promise it hasn’t been eight months since I last had a shower. This year has just flown by so quickly that I didn’t get time to gather my thoughts. My shower thoughts: dreams are confusing. Some people believe that they can tell the future; others feel …
8 Most Important Lessons from the 2023 Berkshire Hathaway Annual Meeting
The Berkshire Hathaway annual meeting is a must-watch event. Legendary investors Warren Buffett and Charlie Munger provide their insights and wisdom on a wide range of topics, ranging from the stock market to the economy and everything in between. The Q&a…