"""Name: Course: CS1430, Section , Spring 2023Assignment: Assignment 1Purpose: This program converts an English unit of length to ametric unit and displays the result. Conversions allowedinclude inches to centimeters, yards to meters and milesto kilometers. Errors are displayed for non-positivevalues and strings other than inches, yards and miles.Input: A float number. Non-positive values are valid. A stringvalue. Valid values are inches, yards and miles.Output: A float value followed by centimeters, meters or kilometersif the value and English unit are valid. Error messagesthat can be outputted are for an invalid English unit ofmeasure or a non-positive value.""""""CONSTANTS"""_INCH_TO_CM =2.54_YARD_TO_METER =0.914_MILE_TO_KM =1.609_INCHES_STRING ='inches'_YARDS_STRING ='yards'_MILES_STRING ='miles'_CENTIMETERS_STRING ='centimeters'_METERS_STRING ='meters'_KILOMETERS_STRING ='kilometers'_INPUT_MEASURE_OUTPUT ='Input a positive measure of length: '_INPUT_UNIT_OUTPUT ='Input inches, yards or miles as the unit of measure: '_INVALID_MEASURE_OUTPUT ='{:.2f} is not a valid measure of length'_INVALID_UNIT_OUTPUT ='{0} is not a valid unit'_OUTPUT_STRING ='The input length of {:.2f} {:s} is equal to {:.2f} {:s}.'"""Fill in a short program description here."""defmain():"""This is your docstring - replace this with a description of the program.:return: None"""# replace the word pass with your code.pass"""Do not remove the code below this line!"""if__name__ =='__main__':main()
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here