As I'm a total programming newbie, I need your advice concerning the coding exercise which I need to fulfil for the online course.
Here is the instruction:
mystery_int_1 = 3
mystery_int_2 = 4
mystery_int_3 = 5
(these will be changed after I submit the code, so it's just an example)
Above are three values. Run a while loop until all three values are less than or equal to 0. Every time you change the value of the three variables, print out their new values all on the same line, separated by single spaces. For example, if their values were 3, 4, and 5 respectively, your code would print:
2 3 4
1 2 3
0 1 2
-1 0 1
-2 -1 0
I tried writing it this way:
while not mystery_int_1 <= 0 and not mystery_int_2 <= 0 and not mystery_int_3 <= 0:
mystery_int_1 -= 1
mystery_int_2 -= 1
mystery_int_3 -= 1
print(mystery_int_1, mystery_int_2, mystery_int_3)
After running the code I realized that there is something wrong with it, but I cannot figure out how to modify it. Tried many options, and neither of them worked as it was supposed to...
Thank you all in advance!