Код: Выделить всё
Traceback (most recent call last):
File "haybales.py", line 5, in
s = input()
File "", line 0
^
SyntaxError: unexpected EOF while parsing
Код: Выделить всё
hay = []
s = input()
while s != 'END':
hay.append(s)
s = input()
for i in hay: #adds all integers in array
var = var + i
if var % hay[0] == 0:
average = var / hay[0] #finds average of all numbers in array
for bale in hay:
diff = bale - average
total += diff
#finds sum of all differences to find the final answer
print 'you need to move' + str(total) + 'piles of hay'
else:
print 'it\'s not possible to make them equal'
Как я могу изменить свой код, чтобы устранить ошибку?
Подробнее здесь: https://stackoverflow.com/questions/394 ... ncorrectly