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).
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 2
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Awesome!
Completion rate improved to 2.7
Numeric Types
Stryg for at vise menuen
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).
Var alt klart?
Tak for dine kommentarer!
Sektion 2. Kapitel 2