Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- searched_book = input()
- total_books_count = 0
- current_book = input()
- book_found = False
- while current_book != "No More Books":
- if searched_book == current_book:
- book_found = True
- break
- else:
- total_books_count += 1
- current_book = input()
- if book_found:
- print(f"You checked {total_books_count} books and found it.")
- else:
- print("The book you search is not here!")
- print(f"You checked {total_books_count} books.")
Advertisement
Add Comment
Please, Sign In to add comment