Powers of two

Define a function powers_of_two that receives a power and uses a for loop
to calculate and return 2 to that power. Do not use the math.pow or or the x**y
operator for this assignment.

Examples:

>>> powers_of_two(0)
1
>>> powers_of_two(1)
2
>>> powers_of_two(2)
4
>>> powers_of_two(3)
8
import unittest


class PowersOf2TestCase(unittest.TestCase):

    def test_case_0(self):
        self.assertEqual(powers_of_two(0), 1)

    def test_case_1(self):
        self.assertEqual(powers_of_two(1), 2)

    def test_case_2(self):
        self.assertEqual(powers_of_two(2), 4)

    def test_case_3(self):
        self.assertEqual(powers_of_two(3), 8)