Update BCDtoDecimalFunc.py

This commit is contained in:
Luke Weiler
2020-10-21 14:03:06 -04:00
committed by GitHub
parent d3a1befe7c
commit 15ba021c21

View File

@@ -16,4 +16,6 @@ def BCDtoDecimalFunc(maxNumber=10000):
problem = "Integer of Binary Coded Decimal " + str(n) + " is = " problem = "Integer of Binary Coded Decimal " + str(n) + " is = "
solution = int(binstring, 2) solution = int(binstring, 2)
return problem, solution return problem, solution
bcd_to_decimal = Generator("Binary Coded Decimal to Integer", 91, "Integer of Binary Coded Decimal b is ", "n", BCDtoDecimalFunc)