mystery_int_1 = 3 mystery_int_2 = 4 mystery_int_3 = 5 You may modify the lines of code above, but don't move them! 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

Respuesta :

Answer:

The solution code is written in Python

  1. import random
  2. mystery_int_1 = 3  
  3. mystery_int_2 = 4  
  4. mystery_int_3 = 5
  5. print(str(mystery_int_1) + " " + str(mystery_int_2) + " " + str(mystery_int_3))
  6. while(mystery_int_1 > 0 or mystery_int_2 > 0 or mystery_int_3 > 0 ):
  7.    mystery_int_1 = random.randint(-5, 5)  
  8.    mystery_int_2 = random.randint(-5, 5)  
  9.    mystery_int_3 = random.randint(-5, 5)  
  10.    print(str(mystery_int_1) + " " + str(mystery_int_2) + " " + str(mystery_int_3))

Explanation:

Firstly import random module (Line 1).

Next, create three variables to hold the three mystery numbers (Line 3-5). Display the first set of three mystery numbers in one line (Line 6).

While any one of the three mysteries number  still bigger than zero, the while loop will keep going (Line 8). In the loop, three new mystery numbers will be generated using the randint method (Line 9-11). We presume the random value is in range -5 to 5. Print the new set of mystery number on the same line (Line 12).