Module: (Python) Subroutines. recursion


Problem

10/12

Number to hexadecimal number system

Theory Click to read/hide

Useful information

English letter 'A' has code 65.
The entry c = chr(65) stores the English letter A.
in the variable c Thus, you can get the desired letter by its code.

Problem

Write a recursive procedure that converts a number to hexadecimal. 

Input
The input to the program is the number N (\(N<=4096\)) - a number in the 10th number system.

Imprint
Display one number on the screen - a number in the hexadecimal number system.

 

Examples
# Input Output
1 123 7B