0

Convert

How to convert from decimal to octal in python

29th Nov 2019, 3:55 PM
Alshaqsia Alshaqsi
Alshaqsia Alshaqsi - avatar
2 Answers
+ 1
Alshaqsia Alshaqsi 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.")
29th Nov 2019, 6:42 PM
Petr
0
other way ?
29th Nov 2019, 4:17 PM
Alshaqsia Alshaqsi
Alshaqsia Alshaqsi - avatar