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
10 Things I Stopped Buying | Financial Minimalism
What’s up you guys? It’s Graham here. So throughout my entire life, I’ve always made a conscious effort to evaluate my spending, cut back on what isn’t necessary, and focus on clearing out the clutter. But this year absolutely threw us all for a curveball…
Khan Academy Ed Talks with Barbara Oakley, Phd - Thursday, June 15
Hello and welcome to Ed Talks with Khan Academy, where we talk to influential people in the education space about learning and teaching. Today, we are pleased to welcome Dr. Barbara Oakley, who is celebrating the launch of her new book, Uncommon Sense Tea…
The Battle for the Soul of Artificial Intelligence | Podcast | Overheard at National Geographic
[Music] I’m a sci-fi nut and one of my favorite books is The Caves of Steel by Isaac Asimov. It’s all about this hard-boiled grizzly detective who gets assigned a strange new partner, a robot. I’ve always wanted a robot partner, and now through the magic…
Jessica Livingston Speaks at Female Founders Conference 2015
Hello everyone! Hi! I’m so happy to be here today and have you all here. Um, wow, there are a lot of you! Oh, that’s better! And I know a lot of you have traveled from really far away too, so this is just wonderful. Um, I have a quick question: how many o…
Dot Com Makes Good | Wicked Tuna
We’re gonna go over to Dave and check his fish out. Steam it, steam it, baby! You having fun yet? Huh? Yeah, huh? This is no round just drive-bys, right? We mark that man big. The meat is pink, beautiful! Here, we’re gonna make a lot of money here. Till …
Canada & The United States's Bizarre Border
Canada and the United States share the longest, straightest, possibly boringest border in the world. But, look closer, and there’s plenty of bizarreness to be found. While these sister nations get along fairly well, they both want to make it really clear …