Advertisement
CR7CR7

task_one

Mar 8th, 2021
748
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.")
Advertisement
RAW Paste Data Copied
Advertisement