Data types define what information is stored
The most used of them are:
Type | Description | Example |
numeric | Whole or floating number. | num = 5 num = 7.2 |
---|---|---|
string | Sequence of symbols (text). | text = 'Python is awesome!' |
boolean | Can have only 2 values - True or False . |
isAwesome = True |
It's done using print
.
The variables are used to store data of certain type.
Their value can be changed any time.
Example of variables definitions:
Write a program in which variables are defined and printed.
Solution:
Output: