Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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.")
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #Python #Program #Convert #Decimal #Octal #Hexadecimal
ADD COMMENT
Topic
Name
1+5 =