mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
17 lines
368 B
Python
17 lines
368 B
Python
from .__init__ import *
|
|
from numpy import pi
|
|
|
|
|
|
def degreeToRadFunc(max_deg=360):
|
|
a = random.randint(0, max_deg)
|
|
b = (pi * a) / 180
|
|
b = round(b, 2)
|
|
|
|
problem = "Angle " + str(a) + " in radians is = "
|
|
solution = str(b)
|
|
|
|
return problem, solution
|
|
|
|
|
|
degreeToRad = Generator("Degrees to Radians", 86, "Angle a in radians is = ", "b", degreeToRadFunc)
|