Advertisement
CR7CR7

Old_library

Mar 8th, 2021
981
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. book_name = input()
  2. book_count = 0
  3. is_book_found = False
  4. current_book = input()
  5. while current_book != 'No More Books':
  6.     if current_book == book_name:
  7.         is_book_found = True
  8.         print(f"You checked {book_count} books and found it.")
  9.         break
  10.         book_count += 1
  11.         current_book = input()
  12.     if not is_book_found:
  13.         print("The book you search is not here!")
  14.         print(f"You checked {book_count} books.")
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement