The code provided has a function discount_on_voucher
which computes discount based on the voucher type given. The function only recognizes specific voucher strings: 'Flat 50', 'Flat 30', and 'Flat 20'.
In the code, you call the function with the voucher 'Flat 75', which is not recognized by the function. Therefore, the discount
variable will remain at its initialized value of 0
.
The execution of the function discount_on_voucher('Flat 75', 1000)
will result in 0
being returned as there is no matching condition for 'Flat 75'.
Finally, the print statement will output:
Discount is 0
Thus, the correct response is: The output will be “Discount is 0.”