Question: Create a program called loopExercise.Prompt the user to enter two values ( indicate the range ) . Validate input to ensure only numerical values are
Create a program called loopExercise.Prompt the user to enter two values indicate the range Validate input to ensure only numerical values are entered. Use a while loop to generate two random values using an appropriate range. The loop should be controlled by the two values entered. Once both values have been randomly generated, the loop should terminate. Print each randomly generated values each iteration.Include a counter variable to count the number of iterations. Once the loop terminates, print the final randomly generated values and the number of iterations it took to generate those two values. Use logical operators.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
