Friday, November 15, 2019

Python program to convert decimal to binary, octal and hexadecimal.

# 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.")


No comments:
Write comments