0% found this document useful (0 votes)
354 views2 pages

Data Types Worksheet

This document discusses data types used in programming. It identifies different data types like logical/Boolean, date, alphanumeric. Logical/Boolean data can store yes/no values like door status. Date of birth cannot be stored as Boolean as it allows multiple formats. Phone numbers and gender are examples of fields best stored as alphanumeric and Boolean respectively. Storing yes/no questions as Boolean has advantages over alphanumeric as only two possible outcomes exist. Multiple date formats are needed to accommodate different ways of writing dates.

Uploaded by

api-267090457
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
354 views2 pages

Data Types Worksheet

This document discusses data types used in programming. It identifies different data types like logical/Boolean, date, alphanumeric. Logical/Boolean data can store yes/no values like door status. Date of birth cannot be stored as Boolean as it allows multiple formats. Phone numbers and gender are examples of fields best stored as alphanumeric and Boolean respectively. Storing yes/no questions as Boolean has advantages over alphanumeric as only two possible outcomes exist. Multiple date formats are needed to accommodate different ways of writing dates.

Uploaded by

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

iGCSE Data Types

Learning Objectives
By the end of this lesson you will be able to:
Identify different data types
Select appropriate data types for a given set of data

1. Which of the following can be stored as LOGICAL/BOOLEAN


data and WHY?
Field Name

Example
Data
19/07/196
5

Boolean
or not?

Date of birth

No

Door status

Open

Boolean

Number of
staples

34

No

Has 4 legs

Yes

Boolean

Reason
Because it can be multiple
answers.
It can only be open or
closed.
You could have any
number of staples.
Because it is a yes or no
question

2. Select a data type and explain why youve chosen it for each
field in the table below.
Field Name

Example
Data

Data Type

Title

Mr/Mrs

Boolean

Phone Number

0121 222
9999

Alphanume
ric

Gender

Boolean

Date of Birth

01/01/190
0

Date

Dates can be stored in


many different forms.

Country

Germany

Logical

There is more than one


country in the world.

Reason
Once you are married
there are two titles.
Alphanumeric or
text/string is used to hold
telephone numbers.
Youre either male or
female.

3. Explain the advantages of storing a yes/no question as


BOOLEAN instead of ALPHANUMERIC.
_It is easier as there are only two possible outcomes.
___________________________________________________________________________________
____________________________________________________________________________________

4. Explain why there is a need to have more than one format


available for storing the date.
So that you can store numbers and letters.
____________________________________________________________________________________

iGCSE Data Types


____________________________________________________________________________________

You might also like