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
Gordon Fishes for Eels | Gordon Ramsay: Uncharted
First things first. Time to go fishing. I hope to get some—some eels. Some eels? Yeah, a Conger eel. We have big conger eels here. GORDON RAMSEY (VOICEOVER): Of course, David wants to go fishing for conger eels. They’re powerful and enormous, just like D…
How to Build a Successful YouTube Channel in 2023 with Ruri Ohama
You might look at successful YouTubers and think they got lucky, but sometimes it’s a process of learning. I feel like I was just posting random videos, not necessarily the best videos, not necessarily the videos that people wanted to watch. So, I was jus…
Homeroom With Sal & Mayor Sam Liccardo - Wednesday, June 3
Hi everyone, welcome to the daily homeroom livestream. For those of you all who are wondering what this is, this is a series of conversations that we’ve started over the last few months. It was, I guess, catalyzed by COVID, but it’s a way of staying in co…
Why following your dreams is ruining your life
Okay. So, I’ve been wanting to make this video for a long time, and I’m still not totally confident that I have the exact words that I want to say, but I am pretty passionate about this concept. And I think there is sort of a toxic narrative in the world …
How Much CAFFEINE KILLS?? .. and more: DONG!
Vsauce. Are you still paying money for things you have to wait to do in real life? Well, no worries, because I’ve got more free stuff you can do online now, guys. DONG. Lots of great suggestions from WeSaucers today. First from ‘fippoolive’, Google search…
Big Short Investors Weigh In On The Banking Crisis (Credit Suisse - Michael Burry, Steve Eisman)
Hello everyone and welcome back to yet another episode of which major bank is failing this week! What a massive season it’s been for the show. We’ve had Silvergate on the program, we had Silicon Valley Bank bite the dust last week, it was all Signature Ba…