Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Find the first number above that is divisible by . Use a loop with break.
break leaves the loop as soon as we have found what we want.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, compare your working with the solution.
Plan. Start at 51 and go up one at a time. When the number is divisible by 7, break.
51, 52, 53, 54, 55 are not divisible by 7. is.
Answer: .
Log in to join the discussion.
Loading…