Python program for conversion of the number systems
Decimal to Binary, Octal, and Hexadecimal
kw.py
Output
kodingwindow@kw:~$ python3 kw.py Enter Decimal number 255 Binary equivalent 0b11111111 Octal equivalent 0o377 Hexadecimal equivalent 0xff
Binary to Decimal, Octal, and Hexadecimal
kw.py
Output
kodingwindow@kw:~$ python3 kw.py Enter Binary number 11111111 Decimal equivalent 255 Octal equivalent 0o377 Hexadecimal equivalent 0xff
Octal to Decimal, Binary, and Hexadecimal
kw.py
Output
kodingwindow@kw:~$ python3 kw.py Enter Octal number 17 Decimal equivalent 15 Binary equivalent 0b1111 Hexadecimal equivalent 0xf
Hexadecimal to Decimal, Binary, Octal
kw.py
Output
kodingwindow@kw:~$ python3 kw.py Enter Hexadecimal number FFFF Decimal equivalent 65535 Binary equivalent 0b1111111111111111 Octal equivalent 0o177777
What Next?
Python program to demonstrate debugging of script
Python program to print the current date and time
Python implementation of the calendar module
Advertisement