Monday, April 27, 2026
HomeComputer Science OutreachTypes of Data and Variables

Types of Data and Variables

• Programming data types provide the kinds of data that can be stored in variables.
• Typical data types consist of:

• whole number (integer)
• Float (decimal points added to numbers)
• Text string
• Boolean (Valid or Invalid)
• There may be more data kinds in different programming languages.

• Variables:
• In a programme, variables are used to store and modify data.
• The data type that a variable will hold is specified when it is declared.
• A variable can have its name and value altered while the programme is running.
Instances of Python declarations:
• Pi = 3.14 (a float variable) and num = 5 (an integer variable).
• name (a string variable) = “John” is_active (a boolean variable) = True

Understanding the uses, manipulations, and operations of data types and variables in your preferred programming language is crucial when working with them.

- Advertisment -

Most Popular

Recent Comments