Computer Science, asked by sony04, 3 months ago

can any one solve this...? in python <br />WAP to enter total bill amount and calculate discount as per given table and also calculate net payable amount (total=bill-discount) in python..​

Attachments:

Answers

Answered by valeriy69
4

\small\mathsf\color{pink}{Solution\: using\: python\: 3}

def calc_discount(bill_amount):

if bill_amount >= 20000:

return bill_amount * (1 - .15)

if bill_amount >= 15000:

return bill_amount * (1 - .1)

if bill_amount >= 10000:

return bill_amount * (1 - .05)

return bill_amount

if __name__ == "__main__":

bill_amount = float(input("bill amount: "))

print(f"net payable amount: {calc_discount(bill_amount)}")

\small\mathsf\color{lightgreen}useful?\: \color{white}\mapsto\: \color{orange}brainliest

Similar questions