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 java2blog.com #
 
PREVIOUS NEXT
Tagged: #python #return #float #decimals
ADD COMMENT
Topic
Name
3+6 =