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))
#------------------------------------------ # Unit Test #------------------------------------------ from mspack import msmath from mspack import msstring print("Sum: ", msmath.sum(10, 20)) print("Division: ", msmath.division(25, 5)) print("Full Name: ", masstring.MsName("Mahmud", "Ahsan").full_name())
def test_division(self): result = msmath.division(50, 25) self.assertEqual(result, 2)