Question: 2 . Write a code segment that uses a while loop, the input function and any other necessary numbers inputted by the user that are

2. Write a code segment that uses a while loop, the input function and any other necessary numbers inputted by the user that are between or including 5 and 9. Trace the code assuming where -1 is a sentinel value that causes the loop to terminate.. Write a code segment that uses a while loop and the random. randint and print etween or including 1 and 6 until a 6 is rolled. The code segment must also count the nun isplay that value once at the very end of its execution.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!