Use the code to answer the question. %0D%0A%0D%0Adef discount_on_voucher(voucher, amount): %0D%0A discount = 0 %0D%0A if voucher == 'Flat 50': %0D%0A discount = 0.5 * amount %0D%0A elif voucher == 'Flat 30': %0D%0A discount = 0.3 * amount %0D%0A elif voucher == 'Flat 20': %0D%0A discount = 0.2 * amount %0D%0A return discount %0D%0A%0D%0Adisc = discount_on_voucher('Flat 75', 1000) %0D%0Aprint(f'Discount is {disc}') %0D%0AWhat will be the output of the code? Execute your code using the Trinket. %0D%0A%0D%0ATrinket%0D%0A%0D%0A(1 point)%0D%0AResponses%0D%0A%0D%0AThe output will be “Discount is 0.”%0D%0AThe output will be “Discount is 0.”%0D%0A%0D%0AThe output will be “Discount is 150.”%0D%0AThe output will be “Discount is 150.”%0D%0A%0D%0AThe output will be “Discount of 1000.”%0D%0AThe output will be “Discount of 1000.”%0D%0A%0D%0AThe output will be “Discount is 200.”%0D%0AThe output will be “Discount is 200.”
1 answer
The correct answer is: The output will be “Discount is 0.”