Recap of Variables II

What We’ve Covered So Far

Variable types:

Integer, floating point numbers, characters

Variable sizes:

  • Integer: -2,147,483,648 to +2,147,483,647
  • Float: 3.4028235E+38 to -3.4028235E+38
  • Character: any single character you can create with your keyboard


For storing more than one of the same type of variable

Questions and Activities to Try:

Now that you feel comfortable with this basic information about variables, here are a couple questions for you before you move on-

1. Is a value of 1 considered an integer, float or character? What about a value of 1.0?

2. Which of the three array types (integer, float and character) could you use to store the following sets of information? Are there any data sets that won’t fit into an array listed below?

  • a r c b o t i c s
  • 1 7 8 16 4 368 0 -2 18 -6531 7 5 82
  • 4 7.3 456.3 e 7 154 56 -12.6 54 u 1212.3333 567 – 6832.1
  • .3 0.0 6.4 -4.6 6.7 4.3333 4.001 .6 -104.0 12012.11118 8.0

3. Is it possible to store two different pieces of information in a variable at the same time?

4. How about using two different variables to get more than two pieces of information about those two variables? (Hint, you can’t do this with character variables.)

For Answers Click Here

Next Step-

Now that you feel comfortable with the basics of the variables we’re going to discuss and use, let’s look at the variable types in more depth. First up, integers!

Next Lesson – Boolean Variables