python
# Python Program - Convert Hexadecimal to Binary
print("Enter 'x' for exit."):
hexdec =input("Enter any number in Hexadecimal Format: "):
if hexadec == 'x':
exit():
else:
dec=int(hexdec,16):
print(hexdec,"in Binary ="bin(dec)):
Output
print("Enter 'x' for exit.");
hexdec = input("Enter any number in Hexadecimal Format: ");
if hexdec == 'x':
exit();
else:
dec = int(hexdec, 16);
print(hexdec,"in Binary =",bin(dec));
hexdec = input("Enter any number in Hexadecimal Format: ");
if hexdec == 'x':
exit();
else:
dec = int(hexdec, 16);
print(hexdec,"in Binary =",bin(dec));
python Decimal to binary
Was this helpful?
Similar Posts
- # Python Program - Pattern Program 2
- Python program to convert a List to Set
- Python program to return multiple values from a function
- Python program to Generate a Random String
- Python3 program to iterate over a list
- [Python] Using comprehension expression to convert list of dictionaries to nested dictionary
- convert pyqt5 resource file .qrs to python file?