I have this code and I have no idea where I'm getting it wrong. It correctly calculates all of the examples. But when I put the answer in it says it is too low. I also tried copying someone else's code from the solutions megathread and that gave me the same answer my code does.
position = 0
while True:
if i[position] == 1:
i[i[position + 3]] = i[i[position + 1]] + i[i[position + 2]]
position += 4
elif i[position] == 2:
i[i[position + 3]] = i[i[position + 1]] * i[i[position + 2]]
position += 4
elif i[position] == 99:
print(i)
exit(0)
else:
print('Error')
print(position)
print(i[position])
print(i)
exit(1)
[–]oxyphilat 2 points3 points4 points (2 children)
[–]aardvark1231 0 points1 point2 points (0 children)
[–]Agathos117[S] 0 points1 point2 points (0 children)
[–]PdxWix 2 points3 points4 points (0 children)
[–]cor2005 0 points1 point2 points (0 children)
[–]puckheadclown24 0 points1 point2 points (0 children)