"""simple docstring"""







from urllib.error import HTTPError

from bsa import BeautifulSoup
from requests import exceptions, get

SCREAMING_SNAKE_CASE						=    'https://www.wellrx.com/prescriptions/{0}/{1}/?freshSearch=true'


def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





	try:
		# Has user provided both inputs?
		if not drug_name or not zip_code:
			return None

		_lowercase			:     Tuple      					=				BASE_URL.format(__UpperCAmelCase  ,__UpperCAmelCase      )
		_lowercase			:     Union[str, Any]      					=				get(__UpperCAmelCase      )

		# Is the response ok?
		response.raise_for_status()

		# Scrape the data using bs4
		_lowercase			:     int      					=				BeautifulSoup(response.text  ,'html.parser'      )

		# This list will store the name and price.
		_lowercase			:     str      					=				[]

		# Fetch all the grids that contains the items.
		_lowercase			:     Dict      					=				soup.find_all('div'  ,{'class': 'grid-x pharmCard'}      )
		if grid_list and len(__UpperCAmelCase      ) > 0:
			for grid in grid_list:
				# Get the pharmacy price.
				_lowercase			:     Optional[Any]      					=				grid.find('p'  ,{'class': 'list-title'}      ).text

				# Get price of the drug.
				_lowercase			:     Any      					=				grid.find('span'  ,{'p', 'price price-large'}      ).text

				pharmacy_price_list.append(
				    {
				        'pharmacy_name': pharmacy_name,
				        'price': price,
				    }      )

		return pharmacy_price_list

	except (HTTPError, exceptions.RequestException, ValueError):
		return None


if __name__ == "__main__":
						# Enter a drug name and a zip code
						SCREAMING_SNAKE_CASE						=    input('Enter drug name: ').strip()
						SCREAMING_SNAKE_CASE						=    input('Enter zip code: ').strip()

						SCREAMING_SNAKE_CASE						=    fetch_pharmacy_and_price_list(
						    drug_name, zip_code
						)

						if pharmacy_price_list:
												print(f"""\nSearch results for {drug_name} at location {zip_code}:""")
												for pharmacy_price in pharmacy_price_list:
																		SCREAMING_SNAKE_CASE						=    pharmacy_price['pharmacy_name']
																		SCREAMING_SNAKE_CASE						=    pharmacy_price['price']

																		print(f"""Pharmacy: {name} Price: {price}""")
						else:
												print(f"""No results found for {drug_name}""")




"""simple docstring"""







def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





	if n == 0:
		return 1

	elif n % 2 == 1:
		return binary_exponentiation(__UpperCAmelCase  ,n - 1      ) * a

	else:
		_lowercase			:     Dict      					=				binary_exponentiation(__UpperCAmelCase  ,n / 2      )
		return b * b


if __name__ == "__main__":
						try:
												SCREAMING_SNAKE_CASE						=    int(input('Enter Base : ').strip())
												SCREAMING_SNAKE_CASE						=    int(input('Enter Power : ').strip())
						except ValueError:
												print('Invalid literal for integer')

						SCREAMING_SNAKE_CASE						=    binary_exponentiation(BASE, POWER)
						print(f"""{BASE}^({POWER}) : {RESULT}""")



