Question: Second Coding Project - Week 2 - P# 2 Write a Python program that: Asks the user a number as a string ( to set

Second Coding Project - Week 2- P#2
Write a Python program that:
Asks the user a number as a string (to set a max number of digits is ok);
Your program should ask which is the base (an Integer from 2 to 16);
With that information, your program should compute the binary and decimal representations of the number, then print it out as a string
For example, if the user enters: FA and 16, your program should print out:
"FA in base 16 is: 250 in base 10 and 1111010 in base 2"
If the user enters: 34 and 5, your program should print:
"34 in base 5 is: 19 in base 10 and 10011 in base 2"
Your task:
Go to Canvas, and submit your Python file (.py) within the deadline:
The deadline for this assignment is Next Thursday.
q,
MERRIMACK COLLEGE
This assignment counts towards the Projects grade.
Second Coding Project - Week 2 - P# 2 Write 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!