Number to binary
Returns the binary representation of the given number.
- Use
bin()
to convert a given decimal number into its binary equivalent.
def to_binary(n): return bin(n) to_binary(100) # 0b1100100
Returns the binary representation of the given number.
bin()
to convert a given decimal number into its binary equivalent.def to_binary(n): return bin(n) to_binary(100) # 0b1100100
Returns the hexadecimal representation of the given number.
Converts an integer to its roman numeral representation.
Accepts value between 1
and 3999
(both inclusive).
Generates a list of numbers in the arithmetic progression starting with the given positive integer and up to the specified limit.
Maps a number from one range to another range.