In a class I have a note on a scale of 1 (low) to 100 (high).
- If I get 71 on my next exam, my exams mean will be 83.
- If I get 99 on my next exam, my exams mean will be 87.
How many exams did I already have?
I've made a small python program to solve it, the result is 510 which is not realistic. My wife told me "6".
What am I doing wrong?
m = 1
found = False
while not found:
m += 1
for i in range(m):
if ((i+71.0) % 83.0)==0 \
and ((i+99.0) % 87.0)==0:
print ('Found here:', i, ((i+71.0)/83.0), ((i+99.0)/87.0))
found = True
break
The result is:
('Found here:', 510, 7.0, 7.0)