
"""simple docstring"""




import itertools
import math



def 							_lowerCamelCase			(			__a     ):

		if 1 < number < 4:
				# 2 and 3 are primes
				return True
		elif number < 2 or number % 2 == 0 or number % 3 == 0:
				# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
				return False

		# All primes number are in format of 6k +/- 1
		for i in range(5,				int(math.sqrt(__a     ) + 1     ),				6     ):
				if number % i == 0 or number % (i + 2) == 0:
						return False
		return True



def 							_lowerCamelCase			(			):
		SCREAMING_SNAKE_CASE_    			=			2
		while True:
				if is_prime(__a     ):
						yield num
				num += 1



def 							_lowerCamelCase			(			__a = 10_001     ):
		return next(itertools.islice(prime_generator(),				nth - 1,				__a     )     )


if __name__ == "__main__":
						print(f'''{solution() = }''')

"""simple docstring"""




from json import JSONDecodeError  # Workaround for requests.exceptions.JSONDecodeError

import requests



def 							_lowerCamelCase			(			__a = "isbn/0140328726"     ):
		SCREAMING_SNAKE_CASE_    			=			olid.strip().strip('''/'''     )  # Remove leading/trailing whitespace & slashes
		if new_olid.count('''/'''     ) != 1:
				SCREAMING_SNAKE_CASE_    			=			F'{olid} is not a valid Open Library olid'
				raise ValueError(__a     )
		return requests.get(F'https://openlibrary.org/{new_olid}.json'     ).json()



def 							_lowerCamelCase			(			__a     ):
		SCREAMING_SNAKE_CASE_    			=			{
		    '''title''': '''Title''',
		    '''publish_date''': '''Publish date''',
		    '''authors''': '''Authors''',
		    '''number_of_pages''': '''Number of pages:''',
		    '''first_sentence''': '''First sentence''',
		    '''isbn_10''': '''ISBN (10)''',
		    '''isbn_13''': '''ISBN (13)''',
		}
		SCREAMING_SNAKE_CASE_    			=			{better_key: ol_book_data[key] for key, better_key in desired_keys.items()}
		SCREAMING_SNAKE_CASE_    			=			[
		    get_openlibrary_data(author['''key''']     )['''name'''] for author in data['''Authors''']
		]
		SCREAMING_SNAKE_CASE_    			=			data['''First sentence''']['''value''']
		for key, value in data.items():
				if isinstance(__a,				__a     ):
						SCREAMING_SNAKE_CASE_    			=			''', '''.join(__a     )
		return data


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						while True:
												lowerCAmelCase__				=					input('\nEnter the ISBN code to search (or \'quit\' to stop): ').strip()
												if isbn.lower() in ("", "q", "quit", "exit", "stop"):
																		break

												if len(isbn) not in (10, 13) or not isbn.isdigit():
																		print(f'''Sorry, {isbn} is not a valid ISBN.  Please, input a valid ISBN.''')
																		continue

												print(f'''\nSearching Open Library for ISBN: {isbn}...\n''')

												try:
																		lowerCAmelCase__				=					summarize_book(get_openlibrary_data(f'''isbn/{isbn}'''))
																		print('\n'.join(f'''{key}: {value}''' for key, value in book_summary.items()))
												except JSONDecodeError:  # Workaround for requests.exceptions.RequestException:
																		print(f'''Sorry, there are no results for ISBN: {isbn}.''')