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 and at the first two prompts?
def main:
try:
total intinputEnter total cost of items?
numitems intinputNumber of items
average total numitems
except ZeroDivisionError:
printERROR: cannot have items'
except ValueError:
printERROR: number of items cannot be negative'
main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
