Update degreeToRadFunc.py

Added 2 decimal point round off in solution
This commit is contained in:
helplessThor
2020-10-20 00:35:48 +05:30
committed by GitHub
parent f9f902e0fd
commit 974695388f

View File

@@ -4,6 +4,7 @@ from numpy import pi
def degreeToRadFunc(max_deg=360): def degreeToRadFunc(max_deg=360):
a = random.randint(0, max_deg) a = random.randint(0, max_deg)
b = (pi*a)/180 b = (pi*a)/180
b = round(b, 2)
problem = "Angle " + str(a) + " in radians is = " problem = "Angle " + str(a) + " in radians is = "
solution = str(b) solution = str(b)