This commit is contained in:
adit098
2020-10-19 21:44:18 +05:30
parent 9a62fbc6b8
commit 57456ca1ad
3 changed files with 16 additions and 1 deletions

View 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

View File

@@ -71,3 +71,5 @@ from .multiplyComplexNumbersFunc import *
from .geomProgrFunc import * from .geomProgrFunc import *
from .geometricMeanFunc import * from .geometricMeanFunc import *
from .harmonicMeanFunc import * from .harmonicMeanFunc import *
from .DegreeToRadian import *
from .DecimalToOctal import *

View File

@@ -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) 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, decimalToHexadecimal = Generator("Decimal to Hexadecimal", 68,
"Hexadecimal of a=", "b", DecimalToHexFunc) "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)