Esempio n. 1
0
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))
Esempio n. 2
0
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")
Esempio n. 3
0
 def test_subtract(self):
     result = msmath.subtract(109, 9)
     self.assertTrue(result == 100)