i need to print a solution list for the input list using the below formula, this is the code:
sub=[1,2,3,4,5,6,7]
a=[]
for i in sub:
def res(i):(sub/12)*100 #this is the formula
a.append(res(i))
print(a)
formula:
(sub/12)*100
i am getting this error:
Traceback (most recent call last):
File "c:\Users\suh\Desktop\se proj 2\backend.py", line 62, in <module>
a.append(res(i))
File "c:\Users\suh\Desktop\se proj 2\backend.py", line 61, in res
def res(i):(sub/12)*100
TypeError: unsupported operand type(s) for /: 'list' and 'int'