Binary to Number converter.

# Prompt the user to enter a binary number
print("You start a binary convert-to-number.\n")

while True:
print("\n\n1. If you are interested then type '1'")
print("2. If you are not interested then type '2'")
choice =
input("Enter choice (1/2): ")

if choice == '2':
print("\nKoi Baat Nahi 😞")
break

if choice == "1":
print("\nok you are come in binary convertor")

binary_number =
input("\nEnter a binary number: ")

# Convert the binary number to an integer using the int() function
number = int(binary_number, 2)

# Print the decimal number
print("1 Your number is = ", number)
print("\n\n        😇😇😇    Your task complete")

Comments

Popular posts from this blog

Python Tkinter QR Code Generator

color guessing game with GUI using python