diff --git a/mathgenerator/funcs/deciToHexaFunc.py b/mathgenerator/funcs/deciToHexaFunc.py new file mode 100644 index 0000000..a815e34 --- /dev/null +++ b/mathgenerator/funcs/deciToHexaFunc.py @@ -0,0 +1,10 @@ +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