Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Calculator():
- def adding(self, a, b):
- wynik = a + b
- print("Suma: " + str(wynik))
- def substraction(self, a, b):
- wynik = a - b
- print("Roznica: " + str(wynik))
- def multiplication(self, a, b):
- wynik = a * b
- print("Iloczyn: " + str(wynik))
- def division(self, a, b):
- wynik = a / b
- print("Iloraz: " + str(wynik))
- calc = Calculator()
- calc.adding(10, 5)
- calc.substraction(15, 5)
- calc.multiplication(5, 5)
- calc.division(100, 10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement