Build a Discount Calculator - Build a Discount Calculator

Tell us what’s happening:

i get test 3 but not 4, when i remove ‘return’ from test 3, i get test 4. how do i get the code to contiue after the first ‘return’?

Your code so far

price = 200
discount = 50
new_price = price - (price * (discount/100))

def apply_discount(price, discount):

    if price != (int or float):
        return'The price should be a number'
           
    if discount != (int or float):
        return'The discount should be a number'

    if price <= 0:
        return'The price should be greater than 0'

    if discount <= 0 or discount > 100:
        return'The discount should be between 0 and 100'
    


print("New Price", new_price)


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36

Challenge Information:

Build a Discount Calculator - Build a Discount Calculator

That’s not possible. return ends the function.

Are you sure that’s what you need to do?

Do not code by the tests. Implement the instructions.

Test the function yourself.