Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The hours of a day can be represented in 24 hour format or the am/pm format. Your employer wants a program that takes an hour
The hours of a day can be represented in 24 hour format or the am/pm format. Your employer wants a program that takes an hour in 24 hour format, and prints It In am/pm format. You are given the following tost data and an Incomplote and erroneous program Input Expected output 0 am 3 am 12 pm 1 pm 12 am 12 13 24 # convert hours # Input: an hour hour 4 if hour 11 string am' else if hour > 12 hour- hour + 12 string'pm print (hour, string) .a. What are the inputs and outputs of this problem and their types? What are the admissible values for the inputs? b. o i What are the syntax errors in this program? ii. Even if they were corrected, which of the above tests would the program fail and why? ii. Some borderline input values are missing from the test table. Indicate those input values and the expected outputs
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started