mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25: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 *
|
||||
@@ -159,3 +159,5 @@ harmonicMean=Generator("Harmonic Mean of N Numbers",67,"Harmonic mean of n numbe
|
||||
decimalToHexadecimal = Generator("Decimal to Hexadecimal", 68,
|
||||
"Hexadecimal of a=", "b", DecimalToHexFunc)
|
||||
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