Jovian
⭐️
Sign In

The task is to find the sum of alternate numbers raised to the power of their next number. For example, for the below example the result should be 25 + 31 = 35.

In [2]:
str = '''2
5
3
1'''
In [3]:
str2 = '''a
b
c
d
e
f'''

if there are 6 rows then the result will be a** b + c** d + e**f

In [4]:
import jovian
In [ ]:
jovian.commit()
[jovian] Saving notebook..
In [ ]: