Ask coding questions

← Back to all posts
What are floats in python?
YvngBashit (13)

What are floats in python?

Geocube101 (553)

Floats are basically decimals
integer = 5
float = 5.0

ADoctor (3)

Floats work similarly to decimals. Integers cannot have any decimal places, whereas floats are always displayed with at least one (if there are none specified, a '.0' will be added at the end).