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
15 Signs You’re NOT COOL
We are not talking about people who use the wrong emojis here, but there’s a case to be made about some of you not being as cool as you think you are. So, let’s put it to the test and see how many of these you tick off. Here are 15 signs you’re not cool. …
Khan Academy Ed Talks with Professor Thomas Guskey, PhD
Hello and welcome to Ed Talks with Khan Academy. I’m Kristin Disarro, the Chief Learning Officer at Khan Academy, and today I am looking forward to talking with Dr. Thomas Guskey about many things learning-related, but particularly grades, grading, and re…
Meditation | The Powerful Effects Of Cleaning
Krishnamurthy said that you cannot reach a meditative state when your living environment is not in perfect order. This is debatable, of course, especially if you read the stoic work Meditations, in which Marcus Aurelius states that we can take refuge in o…
Crystalline and amorphous polymers | AP Chemistry | Khan Academy
Let’s talk a little bit about crystalline and amorphous polymers. Now, in previous videos we talked about crystalline versus amorphous solids. Crystalline solids have a very regular pattern; maybe they look something like this if you imagine the particle…
Warren Buffett: How the Average Person Can Become a Millionaire
So let’s not kid ourselves. The reason why we spend so much time learning about investing is to make money. Whether you’re saving up for a house or building wealth for retirement, we all have our own financial goals. In this video, Warren Buffett is going…
To a Caveman Very Few Things Are Resources
There was a story on ITV in the UK, and they were talking about how much supposed waste that Amazon produces, that Amazon was destroying a whole bunch of products regularly, routinely. I thought, why are these people inserting their opinion into a busines…