Answer:
number = int(input("Enter an integer: "))
if 0 <= number <= 15:
print(str(number) + " in hexadecimal is: " + str(hex(number)))
else:
print("Invalid input!")
Step-by-step explanation:
Ask the user to enter an integer and set it to the number
Check if the number is between 0 and 15. If it is, then convert the number into hexadecimal number using hex method and print it. Otherwise, print a warning message.