Constants, Variables and Data Types
Starter: X=6, Y=7, A= 10 X+Y= A-Y= Y+E=12 What is E?
Variables What is a variable? Research and describe to a partner.
A Variable is: Some thing that could change.
Task: Describe how you think a variable could be used in a computer program to a partner.
Constant Research with a partner and then come up with a comparison to a variable.
A Constant is: A constant is a named item or symbol that does not change. Example: You could define Pi in a program is 3.142 and then this can be used in all subsequent equations.
Task Can you think of other constants you may need a program (you may describe the constants for a specific program) Note: a constant doesn’t have to be a number.
Data types are: A data type defines the range of allowed values that a variable or constant holds
Task 1: Can you list all data types you can think of.
Task 2 Create a table to remind you of all the different data types (state the data type, what it is and then an example) The types you need to identify are: Integer, Real, Boolean, String, character.