VARIABLE DATA TYPES
Explain what is a Data Type.
Data type is a classification of data which tells the compiler or interpreter how the programmer intends to use the data.
Describe the following data types:
Integer - It is used for whole number.
String - It contains alphanumeric characters or text.
Decimal - It contains decimal point.
Float - Represent the real numbers that are approximated
List - An abstract data type that represents a countable number of ordered values
Boolean - To represent the truth values of logic.
Example code for each data type.
Integer - 10
String - 'Apple'
Decimal - 13.2
Float - 0.0003
List - 1,2,3,4,5,6,7,8
Boolean - True/False, Yes/No
Data type is a classification of data which tells the compiler or interpreter how the programmer intends to use the data.
Describe the following data types:
Integer - It is used for whole number.
String - It contains alphanumeric characters or text.
Decimal - It contains decimal point.
Float - Represent the real numbers that are approximated
List - An abstract data type that represents a countable number of ordered values
Boolean - To represent the truth values of logic.
Example code for each data type.
Integer - 10
String - 'Apple'
Decimal - 13.2
Float - 0.0003
List - 1,2,3,4,5,6,7,8
Boolean - True/False, Yes/No
Comments
Post a Comment