def test_minus(self): result = c.minus(0, 5) self.assertEqual(result, -5) self.assertEqual(c.minus(5, 5), 0) self.assertEqual(c.minus(-1, 2), -3) self.assertEqual(c.minus(-1, -2), 1)
def test_minus(self): expected = 1 result = calc.minus(*self.args) self.assertEqual(expected, result)
def test_minus(self): self.assertEqual(calc.minus(5, 2), 3) self.assertRaises(TypeError, calc.minus, "12", "22")
import calc a = int(input("Enter first number: ")) b = int(input("Enter second number: ")) c = str(input("What are we going to do today?: ")) if c == "addition": print(calc.plus(a, b)) if c == "subtraction": print(calc.minus(a, b)) if c == "multiolication": print(calc.mult(a, b))
def test_minus(self): expected = 1; result = calc.minus(*self.args); self.assertEqual(expected, result)
import calc print(calc.plus(10, 5)) print(calc.minus(10, 5)) print(calc.multiply(10, 5)) print(calc.divide(10, 5))
import calc print(calc.plus(1, 2)) print(calc.minus(2, 1)) print(calc.mux(2, 2)) print(calc.divide(3, 2)) print(calc.divide(2, '1'))
import calc print(calc.plus(1, 3)) print(calc.minus(1, 3)) print(calc.multiple(1, 3)) print(calc.divide(1, 0))