Write a program that prompts the user to enter a length in feetand inches and outputs the equivalent length in centimeters. If theuser enters a negative number or a nondigit number, throw andhandle an appropriate exception and prompt the user to enteranother set of numbers. Using Python
Solution
feet = input(“Enter feet: “)if(not feet.isnumeric()): print(“Input should be a positive number”)else: feet = float(feet) if(feet < 0): print(“Input should be a positive number”) else: inch
OR
OR