Question: THIS SHOULD BE DONE USING WHILE LOOPS IN PYTHON ..PLEASE CALL THE FUNCTION IN THE t09 Implement the following function in the PyDev module functions.py
THIS SHOULD BE DONE USING WHILE LOOPS IN PYTHON ..PLEASE CALL THE FUNCTION IN THE t09
Implement the following function in the PyDev module functions.py and test it from a PyDev module named t09 :
def get_int(low, high): """ ------------------------------------------------------- Asks a user for an integer value between low and high, and continues asking until an acceptable value is input. Use: value = get_int(low, high) ------------------------------------------------------- Parameters: low - the lowest acceptable integer (inclusive) (int) high - the higest acceptable integer (inclusive) (int > low) Returns: value - a number between low and high (int) ------------------------------------------------------ """
Sample testing:
Enter a value between 0 and high 100: 110 Value entered is too high Enter a value between 0 and high 100: -10 Value entered is too low Enter a value between 0 and high 100: 75 Value: 75
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
