Question: Python Create a program that will accept either a decimal number ( as a string ) or a binary number ( as a string )

Python Create a program that will accept either a decimal number (as a string) or a binary number (as a string) and display the appropriate symbol, according to the table below. Note the following:
You may copy and paste from the table into your program to make sure you have the correct symbol and bit-stream.
If the user enters a decimal or binary number not in the table, you should print Invalid Number. You do not have to check to make sure the binary number is 8 digits.
Make sure your program output ends with the appropriate symbol or the words Invalid Number, with no other characters.
\table[[Symbol,Decimal Number,Binary Number],[[,64,0100000],[@,91,10101011],[&,126,0111110],[-,124,0111100]]
Here is a sample run of the program:
Enter a decimal or binary number: 64 That symbol is: [
Python Create a program that will accept either a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!