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