Question: 
Write a function that gives loss amount if the given amount has loss else return none.


Model's Code:
def loss_amount(investment, current_value):
    loss = investment - current_value
    return loss if loss > 0 else None



Sample Correct Code:
def loss_amount(actual_cost,sale_amount): 
  if(sale_amount > actual_cost):
    amount = sale_amount - actual_cost
    return amount
  else:
    return None


Asserts:
assert loss_amount(1500,1200)==None
assert loss_amount(100,200)==100
assert loss_amount(2000,5000)==3000


Tests:
Test 1 of 3: FAIL: AssertionError()

Test 452 of 974: 329/452 (72.78761061946902%): failed