# Creating floating-point numbers
num1 = 3.14
num2 = -2.5
num3 = 0.0
# Outputting the floating-point numbers
print(num1)
print(num2)
print(num3)
In this program, we create three floating-point numbers named `num1
`, `num2
`, and `num3
` and assign them the values `3.14
`, `-2.5
`, and `0.0
`, respectively. Floating-point numbers are a type of numeric data in Python that represent real numbers, both positive and negative, as well as zero.
We then use the `print
` function to output the values of the floating-point numbers to the console. When we run the program, it will output the following:
3.14
-2.5
0.0