0% found this document useful (0 votes)
48 views

Python Worksheet 2 Data Types

Uploaded by

klarnissa15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Python Worksheet 2 Data Types

Uploaded by

klarnissa15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like