
from itertools import product


def     __lowerCAmelCase			(			a__						,    a__  )       ->  list[int]:
				__a										=    sides_number
				__a										=    max_face_number * dice_number
				__a										=    [0] * (max_total + 1)

				__a										=    1
				__a										=    range(a__						,    max_face_number + 1  )
				for dice_numbers in product(a__						,    repeat=a__  ):
								__a										=    sum(a__  )
								totals_frequencies[total] += 1

				return totals_frequencies


def     __lowerCAmelCase			(			)       ->  float:
				__a										=    total_frequency_distribution(
				    sides_number=4						,    dice_number=9  )
				__a										=    total_frequency_distribution(
				    sides_number=6						,    dice_number=6  )

				__a										=    0
				__a										=    9
				__a										=    4 * 9
				__a										=    6
				for peter_total in range(a__						,    max_peter_total + 1  ):
								peter_wins_count += peter_totals_frequencies[peter_total] * sum(
								    colin_totals_frequencies[min_colin_total:peter_total]  )

				__a										=    (4**9) * (6**6)
				__a										=    peter_wins_count / total_games_number

				__a										=    round(a__						,    ndigits=7  )

				return rounded_peter_win_probability


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




"""simple docstring"""






from itertools import zip_longest

import requests
from bsa import BeautifulSoup
from pandas import DataFrame


def 			_lowercase				(  __snake_case = "laptop"	)						->   DataFrame:
			__lowerCAmelCase      :  str												=       F"""https://www.amazon.in/laptop/s?k={product}"""
			__lowerCAmelCase      :  Union[str, Any]												=       {
			    "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36\n        (KHTML, like Gecko)Chrome/44.0.2403.157 Safari/537.36",
			    "Accept-Language": "en-US, en;q=0.5",
			}
			__lowerCAmelCase      :  List[str]												=       BeautifulSoup(requests.get(__snake_case					,headers=__snake_case	).text	)
			# Initialize a Pandas dataframe with the column titles
			__lowerCAmelCase      :  Dict												=       DataFrame(
			    columns=[
			        "Product Title",
			        "Product Link",
			        "Current Price of the product",
			        "Product Rating",
			        "MRP of the product",
			        "Discount",
			    ]	)
			# Loop through each entry and store them in the dataframe
			for item, _ in zip_longest(
			    soup.find_all(
			        "div"					,attrs={"class": "s-result-item", "data-component-type": "s-search-result"}					,)					,soup.find_all("div"					,attrs={"class": "a-row a-size-base a-color-base"}	)					,):
						try:
									__lowerCAmelCase      :  Any												=       item.ha.text
									__lowerCAmelCase      :  Union[str, Any]												=       "https://www.amazon.in/" + item.ha.a["href"]
									__lowerCAmelCase      :  Any												=       item.find("span"					,attrs={"class": "a-offscreen"}	).text
									try:
												__lowerCAmelCase      :  Union[str, Any]												=       item.find("span"					,attrs={"class": "a-icon-alt"}	).text
									except AttributeError:
												__lowerCAmelCase      :  Optional[Any]												=       "Not available"
									try:
												__lowerCAmelCase      :  Union[str, Any]												=       (
												    "₹"
												    + item.find(
												        "span"					,attrs={"class": "a-price a-text-price"}	).text.split("₹"	)[1]
												)
									except AttributeError:
												__lowerCAmelCase      :  Dict												=       ""
									try:
												__lowerCAmelCase      :  str												=       float(
												    (
												        (
												            float(product_mrp.strip("₹"	).replace(","					,""	)	)
												            - float(product_price.strip("₹"	).replace(","					,""	)	)
												        )
												        / float(product_mrp.strip("₹"	).replace(","					,""	)	)
												    )
												    * 100	)
									except ValueError:
												__lowerCAmelCase      :  List[str]												=       float("nan"	)
						except AttributeError:
									pass
						__lowerCAmelCase      :  int												=       [
						    product_title,
						    product_link,
						    product_price,
						    product_rating,
						    product_mrp,
						    discount,
						]
			__lowerCAmelCase      :  Union[str, Any]												=       " "
			__lowerCAmelCase      :  Union[str, Any]												=       " "
			data_frame.index += 1
			return data_frame


if __name__ == "__main__":
	__snake_case							:   Any      =    'headphones'
	get_amazon_product_data(product).to_csv(F"""Amazon Product Data for {product}.csv""")