Number to hex
![](/assets/cover/beach-overview-800.webp)
Returns the hexadecimal representation of the given number.
- Use
hex()
to convert a given decimal number into its hexadecimal equivalent.
def to_hex(dec): return hex(dec) to_hex(41) # 0x29 to_hex(332) # 0x14c
Returns the hexadecimal representation of the given number.
hex()
to convert a given decimal number into its hexadecimal equivalent.def to_hex(dec): return hex(dec) to_hex(41) # 0x29 to_hex(332) # 0x14c
Returns the binary representation of the given number.
Converts an integer to its roman numeral representation. Accepts value between 1
and 3999
(both inclusive).
Maps a number from one range to another range.
Generates a list of numbers in the arithmetic progression starting with the given positive integer and up to the specified limit.