Click 'Run' to go.
Understand that there is a difference between printing a letter of the alphabet and printing the value of a variable. Most computer languages take this into account.
If you want to print a letter of the alphabet, say 'b', then you would use a programing line like this:
Note the quotes in the above line.
However, if you were doing some math with a variable named b, and you wanted to print the number that represented the value of the variable b, then you would use a programing line like this:
Note the lack of quotes in the above line.
Here we see the difference between printing a string literal and printing the value of a variable. The string literal can look a lot like a variable name. However, the string literal will be within quotes and the variable name will not.
Although our variables at EZ Programing Demos are all single letter variables, like variables are usually written in mathematics, often computer languages feature long variable names. So, you could use a variable named bankBalance to hold the amount of money in a bank account rather than use a variable named simply b.
Using long variable names makes it important to understand the difference between printing string literals and printing the value of a variable, since long variable names can look a lot like string literals. String literals, of course, have quotes.
This is the flowchart for this program demo:
Here's how this demo could look in imaginary computer code:
printLine("a"); a = 5; printLine(a);
Suggested next article: