hexa

hexa

Utilities for base conversion.

This module provides a function for converting non-negative integers from decimal (base-10) representation into hexadecimal (base-16), returning the result as an uppercase string.

Functions

Name Description
hexa >> Converts a decimal (base-10) number into hexadecimal (base-16).

hexa

hexa.hexa(number)

Converts a decimal (base-10) number into hexadecimal (base-16).

Parameters

Name Type Description Default
number int The decimal number to convert. required

Returns

Name Type Description
str The hexadecimal representation of the number.

Examples

>>> hexa(10)
'A'
>>> hexa(255)
'FF'