Given two numbers a
and b
, return their sum.
Input 6,7
Output 13
Given integers, and only integers, a
and b
, return their sum.
Input
Line 1: 5,5
Line 2: 6,7
Line 3: 9,9
Output
Line 1: 10
Line 2: 13
Line 3: 18
# Write here your code
import unittest
def add(x,y):
return x+y
class MyTest(unittest.TestCase):
def test0(self):
self.assertEqual(add(3,4), 7)
def test1(self):
self.assertEqual(add(5,5), 10)
def test2(self):
self.assertEqual(add(9,9), 18)
if __name__ == '__main__':
unittest.main()