mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Move files to subject folders
This commit is contained in:
17
mathgenerator/funcs/geometry/degree_to_rad.py
Normal file
17
mathgenerator/funcs/geometry/degree_to_rad.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
|
||||
|
||||
degree_to_rad = Generator("Degrees to Radians", 86, "Angle a in radians is = ",
|
||||
"b", degreeToRadFunc)
|
||||
Reference in New Issue
Block a user