intfunctionbinfunctionoctfunctionhexfunction

Run Settings
LanguagePython
Language Version
Run Command
# int(value, base) converts value (using base base) into a decimal number. value = "1010" base = 2 print(int(value, base)) # Output: ???? # Decimal converted to a binary number, an octal number, and a hexadecimal number. beans = int(input("Enter a positive integer: ")) print("Decimal: " + str(beans) + " --> Binary: " + str(bin(beans)) + " --> Octal: " + str(oct(beans)) + " --> Hex: " + str(hex(beans)))
Editor Settings
Theme
Key bindings
Full width
Lines