Computer Science, asked by VanilaSky, 6 months ago

Write a python program to enter bill amount and ask the user the payment mode and give the discount based on payment mode. Also display net payable amount.
Mode | Discount
Credit card | 10% of bill amount
Debit card | 5% of bill amount
Net banking | 2% of bill amount
Otherwise | 0% of bill amount​

Answers

Answered by HozaifaNazarSiddiqui
13

amount = int(input('Amount: '))

mode = str(input('''Please specify the mode

Credit card | 10% of bill amount

Debit card | 5% of bill amount

Net banking | 2% of bill amount

Otherwise | 0% of bill amount'''))

if mode == 'Credit Card':

amount = 90/100*amount

elif mode == 'Debit Card':

amount = 95/100*amount

elif mode == 'Net Banking':

amount = 98/100*amount

else:

amount = amount

print(f'Payable amount is {amount}.')

Similar questions