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

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 1TF: Mark the following statements as true or false: a. To use a predefined function in a program, you...
icon
Related questions
Question

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

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning