mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
15 lines
337 B
Python
15 lines
337 B
Python
from .__init__ import *
|
|
|
|
|
|
def deciToHexaFunc(max_dec=1000):
|
|
a = random.randint(0, max_dec)
|
|
b = hex(a)
|
|
problem = "Binary of " + str(a) + "="
|
|
solution = str(b)
|
|
|
|
return problem, solution
|
|
|
|
|
|
decimal_to_hexadeci = Generator("Decimal to Hexadecimal", 79, "Binary of a=",
|
|
"b", deciToHexaFunc)
|