Skip to content

Python Float

Syntax

Floats in Python are numbers with a decimal point and are used for representing real numbers.

# Assigning floats
x = 10.5
y = -3.14
a = .15
b = 0.15