Python_int_function_example

Run Settings
LanguagePython
Language Version
Run Command
print("Python built-in function: int(value, base)") value = "0001" base = 2 decimal = int(value, base) print(f"If the digits are {value} and the base is {base}, then the decimal number is {decimal}.") # value = "1010" base = 8 decimal = int(value, base) print(f"If the digits are {value} and the base is {base}, then the decimal number is {decimal}.") # value = "1010" base = 16 decimal = int(value, base) print(f"If the digits are {value} and the base is {base}, then the decimal number is {decimal}.")
Editor Settings
Theme
Key bindings
Full width
Lines