Что такое findslide.org?

FindSlide.org - это сайт презентаций, докладов, шаблонов в формате PowerPoint.


Для правообладателей

Обратная связь

Email: Нажмите что бы посмотреть 

Яндекс.Метрика

Презентация на тему Data types

Most programming languages have built in data types that are used when declaring variables. Some common data types, and the ones you need to know for the exam, are as follows:
Data typesObjectives: 1. Explain the need for a range of different data Most programming languages have built in data types that are used when Examples of declaration! Notice that we can assign value to a variable in declaration stage Every data type has its own sizeWe need to remember that it’s Situation 1We have to declare a data type for a variables: numberOfstudentsInGroupnumberOfstudentsInSchoolnumberOfstudentsInKazakhstan What is the difference between integer and float? Situation 2We have to declare a data type for a variables: ageOfstudentaverageAgeOfstudentmaxAgeOfstudentWhich What is the difference between char and string? Situation 3We have to declare a data type for a variables: genderOfstudentnameOfstudentmaxAgeOfstudentWhich DateTime data typeThe DateTime is a value type. It represents an instant Exercise 1Using the correct datatype declare variables for a person's: NameAgeGenderHeight(metres)Date of Exercise 2Which of the following declarations correct, which are wrong and why? Exercise 3Write assignment statements for the following variables using yourself as an example: NameAgeGender Exercise 4Which of the following declarations correct, which are wrong and why? Exercise 5Give two reasons why is it important to get the correct datatypes:1 ___________________________2 ___________________________ Exercise 6Write code that asks the user to insert the date of Exercise 7Create a form for a student that will have: name, surname, age, height, group, gender.
Слайды презентации

Слайд 2 Most programming languages have built in data types

Most programming languages have built in data types that are used

that are used when declaring variables. Some common data

types, and the ones you need to know for the exam, are as follows:

Слайд 3 Examples of declaration
! Notice that we can assign

Examples of declaration! Notice that we can assign value to a variable in declaration stage

value to a variable in declaration stage


Слайд 4 Every data type has its own size
We need

Every data type has its own sizeWe need to remember that

to remember that it’s better to use least
memory-expensive

type for each variable

!


Слайд 5 Situation 1
We have to declare a data type

Situation 1We have to declare a data type for a variables:

for a variables:
numberOfstudentsInGroup
numberOfstudentsInSchool
numberOfstudentsInKazakhstan

Which one data type we

should use for each of them? Try to explain your choice.

Слайд 6 What is the difference between integer and float?

What is the difference between integer and float?

Слайд 7 Situation 2
We have to declare a data type

Situation 2We have to declare a data type for a variables:

for a variables:
ageOfstudent
averageAgeOfstudent
maxAgeOfstudent

Which one data type we should

use for each of them? Try to explain your choice.


Слайд 8 What is the difference between char and string?

What is the difference between char and string?

Слайд 9 Situation 3
We have to declare a data type

Situation 3We have to declare a data type for a variables:

for a variables:
genderOfstudent
nameOfstudent
maxAgeOfstudent

Which one data type we should

use for each of them? Try to explain your choice.



Слайд 10 DateTime data type
The DateTime is a value type.

DateTime data typeThe DateTime is a value type. It represents an

It represents an instant in time, typically expressed as

a date and time of day.


Слайд 11 Exercise 1
Using the correct datatype declare variables for

Exercise 1Using the correct datatype declare variables for a person's: NameAgeGenderHeight(metres)Date

a person's:
Name
Age
Gender
Height(metres)
Date of Birth
license (Do they have a

driver license)



Слайд 12 Exercise 2
Which of the following declarations correct, which

Exercise 2Which of the following declarations correct, which are wrong and why?

are wrong and why?


Слайд 13 Exercise 3
Write assignment statements for the following variables

Exercise 3Write assignment statements for the following variables using yourself as an example: NameAgeGender

using yourself as an example:
Name
Age
Gender


Слайд 14 Exercise 4
Which of the following declarations correct, which

Exercise 4Which of the following declarations correct, which are wrong and why?

are wrong and why?





Слайд 15 Exercise 5
Give two reasons why is it important

Exercise 5Give two reasons why is it important to get the correct datatypes:1 ___________________________2 ___________________________

to get the correct datatypes:
1 ___________________________
2 ___________________________


Слайд 16 Exercise 6
Write code that asks the user to

Exercise 6Write code that asks the user to insert the date

insert the date of birth. Calculate the age of

a student.

  • Имя файла: data-types.pptx
  • Количество просмотров: 129
  • Количество скачиваний: 1