hasancyhn / Base-Conversion

This project contains Python code that converts binary numbers entered by the user into decimal base, and decimal numbers into binary base.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Base-Conversion

This project contains Python code that converts binary numbers entered by the user into decimal base, and decimal numbers into binary base.

BASE CONVERSION Write a Python code that converts binary numbers entered by the user into decimal base, and decimal numbers into binary base.

1- When the program is executed, the user should be presented with 3 options: "Convert from binary to decimal", "Convert from decimal to binary", and "Exit". The program should continue to operate on the same menu until the user chooses to exit.

2- After selecting an option, the user should enter a number that will be converted to the appropriate base and displayed on the screen.

3- For the option of converting from binary to decimal, the program should check if the entered number contains only 0s and 1s. If the entered number is not valid, the user should be prompted to enter a valid binary number.

4- All operations should be done using loops and conditional statements, without using functions or arrays.

5- No built-in functions should be used except for input and output functions.

6- No external Python libraries should be imported.

About

This project contains Python code that converts binary numbers entered by the user into decimal base, and decimal numbers into binary base.


Languages

Language:Python 100.0%