مشروع إدراة المكتبة
Library_books = []
Wish_list = []
book = input ('Enter the of a book you own: ')
if book:
Library_books.append(book)
book2 = input('\nEnter the name of another book you own (or press "Enter" o skip): ')
if book2:
Library_books.append(book2)
print(f'\nYour Library: {Library_books}')
else:
print(Library_books)
wish_book = input('\nEnter the name of a book you wish to have in the future: ')
if wish_book:
Wish_list.append(wish_book)
wish_book2 = input ('\nEnter the name of anther book you wish to have (or press "Enter" to skip): ')
if wish_book2 in Wish_list:
Wish_list.append(wish_book2)
print(f'\nYour wishlist: {Wish_list}')
library_book3 = input("\nEnter the name of the book from the wishlist you've already taken (or press 'Enter' to skip). ")
Library_books.append(library_book3)
Wish_list.remove(library_book3)
print(f'\nUpdated Library: {Library_books}')
print(f'\nUpdated Wishlist: {Wish_list}')
donate_book = input("\nEnter the name of a book from your library you wish to donate (or press 'Enter' to skip): ")
if donate_book in Library_books:
Library_books.remove(donate_book)
print(f'\nFinal Library after Donations: {Library_books}')
else:
print(f'\nYour Library_books: {Library_books}')
print(f'\nYour wishlist: {Wish_list}')
else:
print(f'\nYour Library_books: {Library_books}')
print(f'\nYour wishlist: {Wish_list}')
else:
print('\nYou forgot to write the name of the book')