Beispiel #1
0
 def test_odd(self):
     for n in range(1, 50):
         self.assertEqual(isOddOrEven(n * 2 - 1), 'odd')
Beispiel #2
0
 def test_even4(self):
     for n in range(0, 50):
         self.assertEqual(isOddOrEven(n * 4), 'divisible by 4')
Beispiel #3
0
 def test_even(self):
     for n in range(0, 50):
         self.assertEqual(isOddOrEven(2 + (4 * n)), 'even')