Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from cisc106_32 import*
- def BillAmount(mb):
- if mb <= 50:
- price=50
- elif 50<mb<=400:
- price=(66.50+(.05)(mb-50.00))
- elif 400<mb<=1000:
- price=(72.00+(.08)(mb-50.00))
- else:
- price=100.00
- return price
- assertEqual(BillAmount(45),50)
- assertEqual(BillAmount(400),84)
- assertEqual(BillAmount(2000),100)
- result = (0.5) * (mb - 50.00)
- (.05)(mb-50.00)
- (.05) * (mb-50.00)
- >>> mb=51
- >>> (.05)(mb-50.00)
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: 'float' object is not callable
- >>> (.05)*(mb-50.00)
- 0.050000000000000003
Add Comment
Please, Sign In to add comment