Worksheet 2 Data types and arithmetic
Introduction to Python
Worksheet 2: Data types
1. The user enters data shown in column 1 of the table below. Complete the table below to
show the appropriate data types and give an example of typical data values.
• String holds alphanumeric data (text, numbers and punctuation) as text
• Integer holds whole numbers
• Float holds numbers with a decimal point
Data Data Type Example
Age integer 14
Shoe size float 6.5
Price
Postcode
Height
Quantity in stock
Telephone number
2. The data in column one of the table below is to be read into a program from user input
and stored in variables. Complete the table below.
Variable
Data Instruction(s)
Name
Age age age = int(input("Enter your age "))
Shoe size
Price
Postcode
Height
Quantity in
stock
Telephone
number