Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please solve using python proogramming. 33. Make ChangeA supermarket sells apple

ID: 3749793 • Letter: P

Question

Please solve using python proogramming.

33. Make ChangeA supermarket sells apples for $2.50 per pound. Write a cashier’s program that requests the number of pounds and the amount of cash tendered as input and displays the change from the transaction. If the cash is not enough, the message “You owe $x.xx more.” should be displayed, where $x.xx is the difference between the total cost and the cash. See Fig. 3.12 on the previous page.

FIGURE 3.12 Possible outcome of Exercise 33.

35. Input ValidationWrite a program that asks the user to enter a single uppercase letter and then informs the user if they didn’t comply with the request. See Fig. 3.14.

FIGURE 3.14 Possible outcome of Exercise 35.

37. Military TimeIn military time, hours are numbered from 00 to 23. Under this system, midnight is 00, 1 a.m. is 01, 1 p.m. is 13, and so on. Time in hours and minutes is given as a four-digit string with minutes following hours and given by two digits ranging from 00 to 59. For instance, military time 0022 corresponds to 12:22 a.m. regular time, and military time 1200 corresponds to noon regular time. Write a program that converts from military time to regular time. See Fig. 3.16.

FIGURE 3.16 Possible outcome of Exercise 37.

Explanation / Answer

33)

#out

Enter weight in pounds: 6
Enter payment in dollars: 20
Your change is: $ 5.0

Enter weight in pounds: 5
Enter payment in dollars: 9
you owe $ 3.5

35)

#output

Enter a single uppercase letter: TTT
You did not comply with the request

Enter a single uppercase letter: T
You comply with the request

37)

#output

Enter a military time (0000 to 2359): 1532
The regular time is 03:32 pm.

Enter a military time (0000 to 2359): 1745
The regular time is 05:45 pm.

Enter a military time (0000 to 2359): 1030
The regular time is 10:30 am.

# Please do let me know if u have any concern..