mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
16 lines
363 B
Python
16 lines
363 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)
|