mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
fix #252
This commit is contained in:
11
mathgenerator/funcs/DecimalToOctalFunc.py
Normal file
11
mathgenerator/funcs/DecimalToOctalFunc.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from .__init__ import *
|
||||
|
||||
|
||||
def DecimalToHexFunc(max_dec=99):
|
||||
a = random.randint(1, max_dec)
|
||||
b = oct(a)
|
||||
|
||||
problem = "Octal of " + str(a) + "="
|
||||
solution = str(b)
|
||||
|
||||
return problem, solution
|
||||
@@ -71,3 +71,5 @@ from .multiplyComplexNumbersFunc import *
|
||||
from .geomProgrFunc import *
|
||||
from .geometricMeanFunc import *
|
||||
from .harmonicMeanFunc import *
|
||||
from .DegreeToRadian import *
|
||||
from .DecimalToOctal import *
|
||||
@@ -158,4 +158,6 @@ geometricMean=Generator("Geometric Mean of N Numbers",66,"Geometric mean of n nu
|
||||
harmonicMean=Generator("Harmonic Mean of N Numbers",67,"Harmonic mean of n numbers A1 , A2 , ... , An = "," n/((1/A1) + (1/A2) + ... + (1/An)) = ans",harmonicMeanFunc)
|
||||
decimalToHexadecimal = Generator("Decimal to Hexadecimal", 68,
|
||||
"Hexadecimal of a=", "b", DecimalToHexFunc)
|
||||
degreeToRadian = Generator("Degree To Radian", 69, "Radian of angle=", "radian", DegreeToRadian)
|
||||
degreeToRadian = Generator("Degree To Radian", 69, "Radian of angle=", "radian", DegreeToRadian)
|
||||
decimalToOctal = Generator("Decimal to Octal", 70,
|
||||
"Octal of a=", "b", DecimalToOctalFunc)
|
||||
Reference in New Issue
Block a user