num = int(input("enter a decimal number: ")) print(" binary form is ", bin(num)) print("octal form is ", oct(num)) print("hexadecimal form is ", hex(num))
enter a decimal number: 15 binary form is 0b1111 octal form is 0o17 hexadecimal form is 0xf
Python provides inbuilt functions for conversion of one number system to another.