dec = int("344")

print("The decimal value of",dec,"is:")
print(bin(dec),"in binary.")
print(oct(dec),"in octal.")
print(hex(dec),"in hexadecimal.")
Вывод результата:
('The decimal value of', 344, 'is:')
('0b101011000', 'in binary.')
('0530', 'in octal.')
('0x158', 'in hexadecimal.')


 Похожие публикации
2015-11-30 • Просмотров [ 185 ]