# Intro to Programming: Hausa

## Section2.4Data type

 Learning Objective: Student will be able to... Identify the correct data type for a piece of data
However, once you get that information from the user you need to store it somewhere for later use. Where? This is where the need for variables comes to play. Variables can be thought of as data containers that store data values that can be changed from time to time. There are many types of variables that hold different types of data. The table below shows a list of some of the most common.

### ExercisesExercises

#### 1.Matching Problem, Date Types.

 Learning Objective: Student will be able to... Declare and assign variables
Well now we know where to store our data but how do we implement that in our program? Most languages will require you to declare a variable before you use it. The declaration may look like this
Datatype variable_name → Integer amount
The example above shows a variable declaration in which the variable data type is indicated in this case Integer and the variable name is indicated in this case “amount”. This allows your program to know that the variable “amount” will store data that is an integer. Storing another data type in “amount” like a String will cause an error.
 Did you know: not all languages require variable declaration before use. For example Python, does not require variable declaration
Now let’s go back to our example. Let’s prompt the user to provide the number of students for the 3 classes and store them in variables

### ExercisesExercises

#### 1.

Why did we use integer?

### Activity2.4.1.

Integer class1
Integer class2
Integer class3

Display “Enter the number of students in class 1”
Display “Enter the number of students in class 2”
class2 = Input (assignment)
Display “Enter the number of students in class 3”
class3 = Input (assignment)

Integer class1 Integer class2 Integer class3 Display “Enter the number of students in class 1” class1 = Input Display “Enter the number of students in class 2” class2 = Input Display “Enter the number of students in class 3” class3 = Input (the single equal sign indicates assignment) 

### Activity2.4.2.Activity Coding Exercise.

Save and Run the below program.