Learn Numbers
Stryg for at vise menuen
Let's talk about numbers!
| Type of Number | Usage | Example | Numbers Example | Syntax in Python |
|---|---|---|---|---|
| Integer | We use integer numbers more for counting | Calculate distance between two cities | 1, 2, 6, 10, ... | int |
| Floating-point | We use floating-point numbers for accurate measurements | Define the temperature today | 30.5, 38.9, 10.0006, 60.0 | float |
To check the type of a specific number, use the function type(number).
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 8
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
Fantastisk!
Completion rate forbedret til 2.08Sektion 1. Kapitel 8