Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials Of Services Marketing

Authors: Jochen Wirtz

4th Edition

1292425199, 9781292425191

More Books

Students also viewed these Algorithms questions