write two functions with the following tasks: -Function 1 (called function): accept two arguments: a low acceptable limit, and a high acceptable limit. The low limit MUST be a negative number, while the high limit MUST be a positive number, and your code must verify those two conditions. if the arguments do not meet the conditions above, the function should return the message “Wrong! try again” to the calling function. if the arguments are accepted, the function will ask the user to enter a single number between the low limit and the high limit. if the user enters a single number that falls outside the specified range, the function should emit the message Error: the value is not within permitted range (min..max) and ask the user to input the value again; if the input value is valid, return it as a result. -Function 2 (caller function) No argument is passed to this function The function prompts the user to enter the two numbers to be passed to the called functions. If the return value is “Wrong! try again” then the user is prompted to enter two other numbers. If the return value is the single number the user entered, then the user is asked if he or she wants to continue. If yes, the function should continue running until the user inputs -1, -1 as number to end the loop
Python (this task is NOT graded, this is work for practice)
write two functions with the following tasks:
-Function 1 (called function):
accept two arguments: a low acceptable limit, and a high acceptable limit. The low
limit MUST be a negative number, while the high limit MUST be a positive
number, and your code must verify those two conditions.
if the arguments do not meet the conditions above, the function should return the
message “Wrong! try again” to the calling function.
if the arguments are accepted, the function will ask the user to enter a single number
between the low limit and the high limit.
if the user enters a single number that falls outside the specified range, the function
should emit the message Error: the value is not within permitted range (min..max) and
ask the user to input the value again;
if the input value is valid, return it as a result.
-Function 2 (caller function)
No argument is passed to this function
The function prompts the user to enter the two numbers to be passed to the called
functions.
If the return value is “Wrong! try again” then the user is prompted to enter two other
numbers.
If the return value is the single number the user entered, then the user is asked if he or
she wants to continue. If yes, the function should continue running until the user
inputs -1, -1 as number to end the loop
Step by step
Solved in 3 steps with 1 images