@mishram1271/

PLAB-S8_Task1.3

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def power(e): 
  length = len(myList)
  sum = 0
  for i in range(0,length):
    e = myList[i]
    if (i % 2 == 0):
      sum = sum + e*e
    else:
      sum = sum + e*e*e
  print(sum) 
myList = [8,6,9]
l = len(myList)
for i in range(0,l):
  e = myList[i]
power (e)