Question: How can the following code be tweaked for Have a nice day to be printed as the last output statement when the user enters 7

How can the following code be tweaked for "Have a nice day" to be printed as the last output statement when the user enters 75 and 0 at the first two prompts?
def main():
try:
total = int(input("Enter total cost of items? "))
num_items = int(input("Number of items "))
average = total ?? num_items
except ZeroDivisionError:
print('ERROR: cannot have 0 items')
except ValueError:
print('ERROR: number of items cannot be negative')
main()
 How can the following code be tweaked for "Have a nice

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!