mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
12 lines
226 B
Python
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
|