Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions 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
Check Mark
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education