Numeric Types
Numeric types
| Type | Usage | Examples |
|---|---|---|
int | Typically used for counting | 1, 2, 6, 10, ... |
float | Used for accurate measurements | 30.5, 38.9, 10.0006, 60.0 |
complex | Complex numbers have their uses in many applications related to mathematics | x+iy |
To check the type of a specific variable, use the function type(variable).
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.7
Numeric Types
Swipe to show menu
Numeric types
| Type | Usage | Examples |
|---|---|---|
int | Typically used for counting | 1, 2, 6, 10, ... |
float | Used for accurate measurements | 30.5, 38.9, 10.0006, 60.0 |
complex | Complex numbers have their uses in many applications related to mathematics | x+iy |
To check the type of a specific variable, use the function type(variable).
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2