def process_command(*args): command = args[0] x = int(args[1]) y = int(args[2]) if command == 'sum': print('Sum is: ', msmath.sum(x, y)) if command == 'sub': print('Subtraction is: ', msmath.subtract(x, y)) if command == 'mul': print('Multiplication is: ', msmath.multiplication(x, y)) if command == 'div': print('Division is: ', msmath.division(x, y))
from mspack import msmath from mspack import msstring print(msmath.sum(10, 2)) print(msmath.subtract(10, 2)) print(msmath.multiplication(2, 2)) msstring.print_characters("PHILIPPINES")
def test_subtract(self): result = msmath.subtract(109, 9) self.assertTrue(result == 100)