Question: Task 1 ( of 2 ) : Develop a python seript called HW 1 2 p 2 _ Task 1 _ UCusername.py where you generate

Task 1(of 2):
Develop a python seript called HW12p2_Task1_UCusername.py where you generate random numbers between 0 and 100, filter them based on user-defined lower and upper bounds, and display the valid readings.
The program should:
First. prompt the user to input the target number of valid readings. ensuring that it is a positive integer. If it is not a positive integer, the program should inform the user they entered a non-positive integer and ask them to re-enter the value.
Next, the users will be asked to provide the lower and upper bounds for the valid readings, ensuring that both bounds are between 0 and 100. If not, the program should inform users they must bound their values between 0 and 100 and ask them to reenter the values.
The program will then generate random floating-point numbers by importing the random library (import random) and then using the following Python Function: random. uniform (0,100)
Then, values that fall within the specified bounds should be added to a List of valid numbers using the append() funetion.
Once the target number of valid readings is reached. the program should print the list of valid numbers rounded to two decimal places. The program should also print the total number of random numbers generated.
Test Case:
Enter the target number of valid readings; 5 enter the taryet bound for valid reading: 40 Fonter the upper bound for vilidreadings: 60
valid values List:
56:48
4y.73
44.47
56.15
49.07
Total randoin neniters generatets: 29
A Random Number Generator was used, so your values will not exactly match the test case shown above.
Task 1 ( of 2 ) : Develop a python seript called

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!