Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Article:
- def __init__(self, base_price, quantity):
- self.base_price = base_price
- self.quantity = quantity
- def add_vat(self, current_vat_as_float):
- return self.base_price * (1 + current_vat_as_float)
- item_one = Article(1000.00, 100)
- print("Total:", item_one.add_vat(0.2))
- # Total: 1200.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement