Hexadecimal number
-It is a number which expressed in the base-16 numeral system,
-Hexadeciaml numbers range is 0 to 15
Decimal number
- A number which expressed in the base-10 numeral system.
- Decimal number range is 0 to 9
Conversion of Decimal to Hexadecimal number
Example-
Decimal number - 10
Its Hexa equivalent is- A
Decimal number - 16
Its Hexa equivalent is 10
program -
print("Octal equivalent is - "+hex(int(input("Enter Decimal numbern"))))
Enter Decimal number
10
Octal equivalent is - 0xa
Enter Decimal number
345
Octal equivalent is - 0x159