Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python return float with 3 decimals

# return float with 3 decimals, use round.
# python formula to convert radians to degrees with formula

value = int(input("Provide radian value: "))
rad_angle = round((value * 180) / 3.14159265, 3)
print("The radian value to degrees is: ", rad_angle)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #return #float #decimals
ADD COMMENT
Topic
Name
4+9 =