Question: Please solve using python proogramming. 33. Make ChangeA supermarket sells apples for $2.50 per pound. Write a cashiers program that requests the number of pounds

Please solve using python proogramming.

33. Make ChangeA supermarket sells apples for $2.50 per pound. Write a cashiers 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.

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

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 didnt comply with the request. See Fig. 3.14.

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

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.

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

FIGURE 3.16 Possible outcome of Exercise 37.

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 Databases Questions!