I have this exercise: Create a while-loop that subtracts 8 from 34, 22 times. Answer with the result.
I can subract 8 from 34, until it reaches 0, but how do I do it 22 times instead?
MIN = 0
MAX = 34
while MIN < MAX:
MAX = MAX -8
ANSWER = MAX
Thats how i did it to subtract until it hit 0. But now i need it 22 times, so until it reaches -142. But i want the code to tell me that it's at -142, like if i didn't know it was -142.