Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def excluding_vat_price(price):
- vatPrice = ((price * 15) / 115)
- priceWithoutVat = price - vatPrice
- return -1 if price == 0 else round(priceWithoutVat, 2)
- Traceback (most recent call last):
- File "tests.py", line 14, in <module>
- test.assert_equals(excluding_vat_price(None), -1)
- File "/workspace/default/solution.py", line 5, in excluding_vat_price
- vatPrice = ((price * 15) / 115)
- TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement