In Python:
2. sumOfPowerTwos Write the furiction sumOfPowerTwos(n) tbat takes in an integer called n as a parameter and returns an integer that is the sum of 2° tbrougb 2″. Example: Z0 +2 + 22+. 2. To get credit for this problem, the solution must be implemented recursively. Hint: the solution is very similar to tbe sumOFN problem that was assigned earlier in tbe semester Sample Input Sample Output 15 10 2047 Show transcribed image text 2. sumOfPowerTwos
OR
OR