mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Added kwargs to generator module and readme
This commit is contained in:
@@ -22,4 +22,5 @@ def BCDtoDecimalFunc(maxNumber=10000):
|
||||
|
||||
bcd_to_decimal = Generator("Binary Coded Decimal to Integer", 91,
|
||||
"Integer of Binary Coded Decimal b is ", "n",
|
||||
BCDtoDecimalFunc)
|
||||
BCDtoDecimalFunc,
|
||||
["maxNumber=10000"])
|
||||
|
||||
@@ -30,4 +30,5 @@ def binary2sComplementFunc(maxDigits=10):
|
||||
|
||||
binary_2s_complement = Generator("Binary 2's Complement", 73,
|
||||
"2's complement of 11010110 =", "101010",
|
||||
binary2sComplementFunc)
|
||||
binary2sComplementFunc,
|
||||
["maxDigits=10"])
|
||||
|
||||
@@ -16,4 +16,5 @@ def binaryComplement1sFunc(maxDigits=10):
|
||||
|
||||
|
||||
binary_complement_1s = Generator("Binary Complement 1s", 4, "1010=", "0101",
|
||||
binaryComplement1sFunc)
|
||||
binaryComplement1sFunc,
|
||||
["maxDigits=10"])
|
||||
|
||||
@@ -13,4 +13,5 @@ def binaryToDecimalFunc(max_dig=10):
|
||||
|
||||
|
||||
binary_to_decimal = Generator("Binary to Decimal", 15, "Decimal of a=", "b",
|
||||
binaryToDecimalFunc)
|
||||
binaryToDecimalFunc,
|
||||
["max_dig=10"])
|
||||
|
||||
@@ -12,4 +12,5 @@ def binaryToHexFunc(max_dig=10):
|
||||
|
||||
|
||||
binary_to_hex = Generator("Binary to Hexidecimal", 64, "Hexidecimal of a=",
|
||||
"b", binaryToHexFunc)
|
||||
"b", binaryToHexFunc,
|
||||
["max_dig=10"])
|
||||
|
||||
@@ -18,4 +18,5 @@ def DecimalToBCDFunc(maxNumber=10000):
|
||||
|
||||
decimal_to_bcd = Generator("Decimal to Binary Coded Decimal", 103,
|
||||
"Binary Coded Decimal of Decimal n is ", "b",
|
||||
DecimalToBCDFunc)
|
||||
DecimalToBCDFunc,
|
||||
["maxNumber=10000"])
|
||||
|
||||
@@ -12,4 +12,5 @@ def DecimalToBinaryFunc(max_dec=99):
|
||||
|
||||
|
||||
decimal_to_binary = Generator("Decimal to Binary", 14, "Binary of a=", "b",
|
||||
DecimalToBinaryFunc)
|
||||
DecimalToBinaryFunc,
|
||||
["max_dec=99"])
|
||||
|
||||
@@ -11,4 +11,5 @@ def deciToHexaFunc(max_dec=1000):
|
||||
|
||||
|
||||
decimal_to_hexadeci = Generator("Decimal to Hexadecimal", 79, "Binary of a=",
|
||||
"b", deciToHexaFunc)
|
||||
"b", deciToHexaFunc,
|
||||
["max_dec=1000"])
|
||||
|
||||
@@ -10,4 +10,5 @@ def decimalToOctalFunc(maxDecimal=4096):
|
||||
|
||||
decimal_to_octal = Generator("Converts decimal to octal", 84,
|
||||
"What's the octal representation of 98?", "0o142",
|
||||
decimalToOctalFunc)
|
||||
decimalToOctalFunc,
|
||||
["maxDecimal=4096"])
|
||||
|
||||
@@ -23,4 +23,5 @@ def fibonacciSeriesFunc(minNo=1):
|
||||
|
||||
fibonacci_series = Generator(
|
||||
"Fibonacci Series", 56, "fibonacci series of first a numbers",
|
||||
"prints the fibonacci series starting from 0 to a", fibonacciSeriesFunc)
|
||||
"prints the fibonacci series starting from 0 to a", fibonacciSeriesFunc,
|
||||
["minNo=1"])
|
||||
|
||||
@@ -11,4 +11,5 @@ def moduloFunc(maxRes=99, maxModulo=99):
|
||||
return problem, solution
|
||||
|
||||
|
||||
modulo_division = Generator("Modulo Division", 5, "a%b=", "c", moduloFunc)
|
||||
modulo_division = Generator("Modulo Division", 5, "a%b=", "c", moduloFunc,
|
||||
["maxRes=99", "maxModulo=99"])
|
||||
|
||||
@@ -14,4 +14,5 @@ def nthFibonacciNumberFunc(maxN=100):
|
||||
|
||||
nth_fibonacci_number = Generator("nth Fibonacci number", 62,
|
||||
"What is the nth Fibonacci number", "Fn",
|
||||
nthFibonacciNumberFunc)
|
||||
nthFibonacciNumberFunc,
|
||||
["maxN=100"])
|
||||
|
||||
Reference in New Issue
Block a user