def getInput(): return int(input("Enter a call number: ")) def findBook (callNumber): if callNumber> 699 and callNumber <751: return elif (callNumber > 500 and callNumber < 901) and not (callNumber > 699 and callNumber < 751): elif (callNumber> 199 and callNumber < 501) or callNumber > 900: return return elif callNumber > 99 and callNumber < 200: return else: return def displayResult(result): print("Result for you request: ", result) def main(): print("Enter -1 to exit application \n") main() callNumber getInput() while callNumber != -1: locationOfBook findBook (callNumber) displayResult(locationOfBook) callNumber get Input () print("Good-bye!")

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Code is in Python

Write an application that allows the user to enter a call number of a book, and if the book is
located, the location will be displayed. The application will continue to ask the user for a call
number until the user enters -1 to exit the application. Below is the call number
legend you will need to return the correct output. Make sure to pay close attention
to the conditional requirements for each output.

Call Numbers and their locations are:

99 and below = Book not found!                                                                            

100-199 =  Basement                                                                                  

200-500 and over 900 = Main Floor

501-900 except 700-750 = Upper Floor

700-750 = Archives

Copy the source code give in the picture. NOTE: The application won’t return the correct
output until you add them accordingly

Use the call number legend table above to return the correct outputs. Currently,
the application will return empty strings for each. It is your task to enter the
correct output based on the conditional criteria. 

def getInput():
return int(input("Enter a call number: "))
def findBook(callNumber):
if callNumber > 699 and callNumber <751:
return
elif (callNumber > 500 and callNumber < 901) and not (callNumber > 699 and callNumber < 751):
return
elif (callNumber > 199 and callNumber < 501) or callNumber > 900:
return
elif callNumber > 99 and callNumber < 200:
return
else:
return
def displayResult(result):
print("Result for you request: ", result)
def main():
print("Enter -1 to exit application \n")
callNumber = getInput()
main()
while callNumber != -1:
locationOfBook findBook (callNumber)
displayResult(locationOfBook)
callNumber =
getInput()
print("Good ve!")
Transcribed Image Text:def getInput(): return int(input("Enter a call number: ")) def findBook(callNumber): if callNumber > 699 and callNumber <751: return elif (callNumber > 500 and callNumber < 901) and not (callNumber > 699 and callNumber < 751): return elif (callNumber > 199 and callNumber < 501) or callNumber > 900: return elif callNumber > 99 and callNumber < 200: return else: return def displayResult(result): print("Result for you request: ", result) def main(): print("Enter -1 to exit application \n") callNumber = getInput() main() while callNumber != -1: locationOfBook findBook (callNumber) displayResult(locationOfBook) callNumber = getInput() print("Good ve!")
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

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