Я пытаюсь запустить этот фрагмент кода и получаю сообщение об ошибке 'int' object is not iterable for line 10
. Не уверен, где я ошибся.
def inputVal(prompt,lower,upper):
print(prompt)
retVal = int(input())
while retVal<lower or retVal>upper:
print('Incorrect Value')
retVal = int(input())
return retVal
numComp = inputVal("Please enter number of competitors", 5, 20)
for comp in numComp:
total=0
for i in range(5):
judgescore = inputVal('Please input judges score', 0, 10)
total = total + judgescore
print("Total judge score for competitor ", comp+1, "is: ", total)
print("Average judge score for competitor ", comp+1, "is: ", total/5)