def_discount_voucher(voucher, amount)

discount = 0
if voucher == 'Flat 50':
discount = 0.5 * amount
elif voucher == 'Flat 30':
discount = 0.3 * amount
elif voucher == 'Flat 20':
discount = 0.2 * amount
return discount

disc = discount_on_voucher('Flat 75', 1000)
print(f'Discount is{disc}')

What will be he output of the code?

1 answer

The output of the code will be:

Discount is 0
Similar Questions
  1. def_discount_voucher(voucher, amount)discount = 0 if voucher == 'Flat 50': discount = 0.5 * amount elif voucher == 'Flat 30':
    1. answers icon 1 answer
  2. Use the code to answer the question.def discount_on_voucher(voucher, amount): discount = 0 if voucher == 'Flat 50': discount =
    1. answers icon 1 answer
    1. answers icon 5 answers
  3. Use the code to answer the question.def discount_on_voucher(voucher, amount): discount = 0 if voucher == 'Flat 50': discount =
    1. answers icon 1 answer
more similar questions