





from urllib.error import HTTPError

from bsa import BeautifulSoup
from requests import exceptions, get

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






def 			lowerCamelCase__	(__lowerCamelCase,				__lowerCamelCase		):

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

          _SCREAMING_SNAKE_CASE				:		Tuple  			=							BASE_URL.format(__lowerCamelCase,				__lowerCamelCase		)
          _SCREAMING_SNAKE_CASE				:		List[Any]  			=							get(__lowerCamelCase		)

          # Is the response ok?
          response.raise_for_status()

          # Scrape the data using bs4
          _SCREAMING_SNAKE_CASE				:		Any  			=							BeautifulSoup(response.text,				"html.parser"		)

          # This list will store the name and price.
          _SCREAMING_SNAKE_CASE				:		int  			=							[]

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

                    # Get price of the drug.
                    _SCREAMING_SNAKE_CASE				:		Optional[int]  			=							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
       UpperCamelCase__          =input('Enter drug name: ').strip()
       UpperCamelCase__          =input('Enter zip code: ').strip()

       UpperCamelCase__          =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:
                     UpperCamelCase__          =pharmacy_price['pharmacy_name']
                     UpperCamelCase__          =pharmacy_price['price']

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



"""simple docstring"""


import math
from decimal import Decimal, getcontext






def    a__       ( __lowercase = 400_0000      )		->		int:

				try:
								_A         =	int(__lowercase      )
				except (TypeError, ValueError):
								raise TypeError("Parameter n must be int or castable to int."      )
				if n <= 0:
								raise ValueError("Parameter n must be greater than or equal to one."      )
				_A         =	100
				_A         =	(Decimal(5      ) ** Decimal(0.5      ) + 1) / Decimal(2      )

				_A         =	(math.floor(math.log(n * (phi + 2)   ,	__lowercase      ) - 1      ) // 3) * 3 + 2
				_A         =	Decimal(round(phi ** Decimal(index + 1      )      )      ) / (phi + 2)
				_A         =	num // 2
				return int(__lowercase      )


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