mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
added latex unavailable message and scripts folder
This commit is contained in:
@@ -5,11 +5,14 @@ def DecimalToBinaryFunc(max_dec=99, format='string'):
|
||||
a = random.randint(1, max_dec)
|
||||
b = bin(a).replace("0b", "")
|
||||
|
||||
problem = "Binary of " + str(a) + "="
|
||||
solution = str(b)
|
||||
|
||||
return problem, solution
|
||||
|
||||
if format == 'string':
|
||||
problem = "Binary of " + str(a) + "="
|
||||
solution = str(b)
|
||||
return problem, solution
|
||||
elif format == 'latex':
|
||||
return "Latex unavailable"
|
||||
else:
|
||||
return a, str(b)
|
||||
|
||||
decimal_to_binary = Generator("Decimal to Binary", 14, DecimalToBinaryFunc,
|
||||
["max_dec=99"])
|
||||
|
||||
Reference in New Issue
Block a user