Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Finally, the course compares how code is written in several different languages, the libraries and frameworks that have grown around them, and the reasons to choose each one.
As soon as we write even the simplest program in any programming language, we have to keep track of pieces of information. If we are building a loan calculator, we need to keep track of the amount of the loan, the number of months, the interest rate. If we are writing a game program, we might need to know the current score, the position of the player on the screen, how many lives do we have left, what image do we use for our player. This is all data and we create variables to hold that data.
No other characters are allowed but you can't actually start with a number. So this variable name for example would not work, but reversing them so the number's at the end, that would work, and we will talk more about naming our variables later on when we talk about style guidelines, but I am just going to use simple names for now. All we are doing when we create a variable is carving out a little area of memory to hold a value. Right now after this line of code runs, this variable exists.
So be careful when you're naming your variables. Now if you are creating multiple variables at the same time, you can of course do them on multiple lines like this but you can actually combine them on to one line, separating the variable names with commas. It's just a shorthand way of doing this. And similar to that if you're actually creating multiple variables and giving them all initial values you can still combine them on to one line. This makes it a little easier to read, a little shorter to write.
There are currently no FAQs about Foundations of Programming: Fundamentals.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.