Advertisement
Guest User

Untitled

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