mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Create radianToDegFunc.py
Radian to Degree Conversion function created
This commit is contained in:
12
mathgenerator/funcs/radianToDegFunc.py
Normal file
12
mathgenerator/funcs/radianToDegFunc.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from .__init__ import *
|
||||||
|
from numpy import pi
|
||||||
|
|
||||||
|
def degreeToRadFunc(max_rad=pi):
|
||||||
|
a = random.randint(0, max_rad)
|
||||||
|
b = (180*a)/pi
|
||||||
|
b = round(b, 2)
|
||||||
|
|
||||||
|
problem = "Angle " + str(a) + " in degrees is = "
|
||||||
|
solution = str(b)
|
||||||
|
|
||||||
|
return problem, solution
|
||||||
Reference in New Issue
Block a user