2.2: Data Types
What are the different data types?
When programming, variables should be given appropriate data types.
A single character, such as a letter, number or punctuation symbol.
A sequence of characters, including letters, numbers and punctuation.
Ice Age 4
A whole number.
A decimal number.
An answer that only has two possible values.
True / False
Yes / No
0 / 1
Telephone numbers are always stored as a string, not an integer.
Converting the value of a variable from one data type into another is known as casting.
Python automatically assumes an input is a string so the int() command is used to cast an input into an integer. Other Python commands for casting include str() and float().
age = int(input("Enter your age: "))
2.2 - Data Types:
1. List the five data types, giving an example of each. 
2. State which data type is most suitable for the following variables:
a. Age 
b. Surname 
c. Height (in metres) 
d. First Initial 
e. Phone number 
f. Right-Handed? 
3. Explain what casting is and give a programming situation in which it would be used.