This lesson introduces Python's type system. Replace this with your own content.
Declaring variables
A variable gets its type from the value assigned to it. A type hint after the name documents the type you expect:
count = 0 # intprice = 9.99 # floatname = "Ada" # strage: int = 30ratio: float = 0.5ready: bool = Falseprint(type(count), type(price), type(name))Topics
- Basic types
- Variables and assignment
- Type conversions