A functions group inside in one function, to convert decimal numbers to others numbers bases, being then: binary, octagonal and hexadecimal.
After of import the function with command:
from program impoprt Converter
You can assing a function to a variable, by passing the values, first value is the decimal number to convert and the other value is the base to convert number. See the examples bellow:
x = Convert(20,"Bin") # return 10100 as type int
x = Convert(30,"Oct") # return 36 as type int
x = Convert(15,"Hex") # return "F" as type sting
In value of the conversion base, you can by passing the value in number format, as:
x = Convert(20,2) # return 10100 as type int
x = Convert(30,8) # return 36 as type int
x = Convert(15,16) # return "F" as type sting