python float

Published: 11 June 2021
on channel: 2Source Fort
14
0

Floats are used in Python to represent numbers that aren't integers (whole numbers).


Some examples of numbers that are represented as floats are 0.5 and -7.8237591.


They can be created directly by entering a number with a decimal point, or by using operations such as division on integers.
print( 3/4 )
print( 0.42 )


As you saw previously, dividing any two integers produces a float.
A float is also produced by running an operation on two floats, or on a float and an integer.
print( 8 / 2 )

print( 6 * 7.0 )

print( 4 + 1.65 )


On this page of the site you can watch the video online python float with a duration of hours minute second in good quality, which was uploaded by the user 2Source Fort 11 June 2021, share the link with friends and acquaintances, this video has already been watched 14 times on youtube and it was liked by 0 viewers. Enjoy your viewing!