我正在尝试以下问题,但我不知道出了什么问题。有人可以帮我解决吗?
java=10
python=10
sql=5
unix=5
javascript=5
framework=10
i=eval(input("Enter courses done in a list"))
if sum(i)>=30:
print("eligible since the score is", sum(i))
else:
print("Not eligible since the score is",sum(i))
但我收到以下错误,
Traceback (most recent call last):
File "E:/Python Notes/Python Programs/Eligible for placement.py", line 8, in <module>
if sum(i)>=30:
TypeError: unsupported operand type(s) for +: 'int' and 'str'
提前致谢!!