Answers for "python convert binary / hexadecimal / decimal to binary / hexadecimal / decimal"

2

python convert binary / hexadecimal / decimal to binary / hexadecimal / decimal

## First install the module coden with pip in cmd
# pip install coden

## import module
import coden

## Convert

# Binary to Decimal
ans = coden.bin_to_int(number)
# Binary to Hexadecimal
ans = coden.bin_to_hex(number)

# Hexadecimal to Decimal
ans = coden.hex_to_int(number)
# Hexadecimal to Binary
ans = coden.hex_to_bin(number)

# Decimal to Binary
ans = coden.int_to_bin(number)
# Decimal to Hexadecimal
ans = coden.int_to_hex(number)


# Thank you!
Posted by: Guest on February-08-2021
3

convert decimal to hex python

    hex(x) being x the integer you want to convert
Posted by: Guest on October-28-2020
-1

python library to convert decimal into octal and hexadecimal

dec =13
print(bin(dec),oct(dec),hex(dec))		#prints decimal,octal,hexadecimal value of 13
Posted by: Guest on July-02-2020

Code answers related to "python convert binary / hexadecimal / decimal to binary / hexadecimal / decimal"

Python Answers by Framework

Browse Popular Code Answers by Language