@mishram1271/

PLAB-S8_Task1.2

Python

No description

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