Question

Write a program using if- then loop for issuing general books and not reference books in a library.

09 Jan 2025
Answer :
Word Count : 336

In this scenario, we can create a simple program that allows the issuance of general books while restricting the issuance of reference books in a library setting. The use of an if-then loop ensures that only general books can be issued based on their classification, while reference books will not be issued.

Code Implementation (in Python):

 # Function to issue books in a library def issue_book(book_type): # Check if the book is a general book or reference book if book_type == "general": print("The general book has been issued successfully.") elif book_type == "reference": print("Reference books cannot be issued. Please refer to the library in-house.") else: print("Invalid book type. Please enter a valid book type ('general' or 'reference').") # Main part of the program book_type_input = input("Enter the 
____ _________ _________ _____ _____ _______ ______ ___.
________ __________ _______ ________ _________.
________ _______ _______ ____ ______ ___ _____ _____ __________.
_______ ____ _______ _________ _____ ___ ________ _______ _______ _________.
______ _____ _____ _________ ________ _______ ___ ___.
____ ________ _______ ___ ______.
_________ ___ ___ _____ _______ ____ ________ ______.
___ _________ ________ _________ __________ ____ ____ ________ _________.
_________ ______ ______ _______ ____ ______ _________ ___ __________ ___ _____ ___.
____ _________ __________ ______ ________ ____.
_______ ___ ______ __________ __________ _________.
_________ ______ _________ _______ ________.
____ _____ ____ ___ __________.
_______ _________ __________ _____ ______ _____ _______ _______ ________ __________ __________.
___ __________ ________ _____ _______ ______ ____.
_____ _____ ___ _______ _________ __________.
___ _______ ____ ____ ____ _______ _______ _________ _________.
__________ _________ ________ __________ ____ _____ _____ _________ __________ _________ ______.
___ _________ _______ ___ _________ _____ ___.
________ _______ ______ _______ __________ ___ ___ ________ ____ _________ __________ ___.
_____ ________ ________ ____ _______.
___ ____ _______ ________ ______ _______ _______ __________ ____ ___ _________ ___.
______ _______ _________ __________ _________ ________.
________ _____ _____ ____ ____ _________ _______ _____ _______ __________ _________.
_______ ________ _________ ____ ___.
_______ _____ _________ _____ _____ ________ ______.
_____ _______ __________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MLIL 7 2024 - Write a program using if- then loop for issuing general books and not | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→