Question: Running a program that ends in a yes/no response. I need the yes response to trigger the program to ask the same questions as when
Running a program that ends in a yes/no response. I need the "yes" response to trigger the program to ask the same questions as when the program started....
Example:
def multiply (a,b):
return a*b
a = float(input("What is the price of each tablet?"))
b = float(input("How many tablets are you purchasing?"))
SalesTax = .10
Shipping = 15
Subtotal = (a*b)
print(f"Your Subtotal is:",(a*b))
print(f"Sales Tax:" (SalesTax))
print (f"Shipping:" (Shipping))
response = input(f"Anything Else? (Y/N)")
if response == "Y":
-this is where I'm stuck-
if response == "N":
print ("Have a nice day!")
break
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
