The output of the code will be:
Discount is 0
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