covert decimal into hex

subhamsingh · February 28, 2023
# Python program to convert decimal into other number systems
dec = 344

print("The decimal value of", dec, "is:")
print(bin(dec), "in binary.")
print(oct(dec), "in octal.")
print(hex(dec), "in hexadecimal.")
Output

Comments

Please sign up or log in to contribute to the discussion.