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