Files
mathgenerator/mathgenerator/funcs/DecimalToBinaryFunc.py
2020-10-19 13:54:31 -04:00

12 lines
226 B
Python

from .__init__ import *
def DecimalToBinaryFunc(max_dec=99):
a = random.randint(1, max_dec)
b = bin(a).replace("0b", "")
problem = "Binary of " + str(a) + "="
solution = str(b)
return problem, solution