Create a program wherein any user should be able to borrow books. Each of the book must have three copies. Indicate how many books are left when they want to borrow a book. Users should be able to check-out and reserve any copy.
print("1.3 Python books available\n2.3 Java books available")
n=int(input("Enter the book to borrow: "))
if n==1:
print("You borrowed Python book the remaining python books are 2")
print("The remaining Java books are 3")
n=int(input("Enter the book to borrow: "))
if n==1:
print("You borrowed Python book the remaining python book is 1")
print("The remaining Java books are 3")
n=int(input("Enter the book to borrow: "))
if n==1:
print("You borrowed Python book no python book remaining")
print("The remaining Java books are 3")
elif n==2:
print("You borrowed Java book the remaining Java books are 2")
print("The remaining python books is 1")
if n==2:
print("You borrowed Java book the remaining Java books are 2")
print("The remaining Python books are 3")
n=int(input("Enter the book to borrow: "))
if n==1:
print("You borrowed Python book the remaining python book is 2")
print("The remaining Java books are 2")
n=int(input("Enter the book to borrow: "))
if n==1:
print("You borrowed Python book the remaining python books are 2")
print("The remaining Java books are 2")
elif n==2:
print("You borrowed Java book the remaining Java books is 1")
print("The remaining python books is 3")
n=int(input("Enter the book to borrow"))
if n==1:
print("You borrowed Python book the remaining Python books are 2")
print("The remaining Java books is 1")
elif n==2:
print("You borrowed Java book no remaining Java books")
print("The remaining Python books are 3")
Comments
Leave a comment