Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- book = input()
- book_count = int(input())
- is_found = False
- counter = 0
- for i in range(book_count):
- command = input()
- if command == '' or command == "No More Books":
- break
- elif command == book:
- print(f"You checked {counter} books and found it.")
- is_found = True
- break
- counter += 1
- if not is_found:
- print(f"The book you search is not here!\nYou checked {counter} books.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement