




'''simple docstring'''






import math






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE		)						->      list[int]:
      if not isinstance(__SCREAMING_SNAKE_CASE							,			__SCREAMING_SNAKE_CASE		):
            snake_case__					:      Optional[Any]  			=						f"Input value of [number={number}] must be an integer"
            raise TypeError(__SCREAMING_SNAKE_CASE		)
      if number < 1:
            snake_case__					:      Any  			=						f"Input value of [number={number}] must be a positive integer"
            raise ValueError(__SCREAMING_SNAKE_CASE		)
      snake_case__					:      Any  			=						[number]
      while number != 1:
            if number % 2 == 0:
                  snake_case__					:      Tuple  			=						math.floor(math.sqrt(__SCREAMING_SNAKE_CASE		)		)
            else:
                  snake_case__					:      Union[str, Any]  			=						math.floor(
                      math.sqrt(__SCREAMING_SNAKE_CASE		) * math.sqrt(__SCREAMING_SNAKE_CASE		) * math.sqrt(__SCREAMING_SNAKE_CASE		)		)
            sequence.append(__SCREAMING_SNAKE_CASE		)
      return sequence


if __name__ == "__main__":
      import doctest

      doctest.testmod()






'''simple docstring'''






import bsa
import requests






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE		)						->      dict[str, str]:
      return {
          "name": soup.ha.a.text,
          "genre": soup.find('span'							,			class_='genre'		).text.strip(),
          "rating": soup.strong.text,
          "page_link": f"https://www.imdb.com{soup.a.get('href'		)}",
      }






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE = 5		)						->      tuple:
      snake_case__					:      Tuple  			=						int(float(__SCREAMING_SNAKE_CASE		)		)
      if num_movies < 1:
            return ()
      snake_case__					:      Any  			=						(
          'https://www.imdb.com/search/title?title_type='
          f"feature&sort=num_votes,desc&count={num_movies}"
      )
      snake_case__					:      Union[str, Any]  			=						bsa.BeautifulSoup(requests.get(__SCREAMING_SNAKE_CASE		).content							,			'html.parser'		)
      return tuple(
          get_movie_data_from_soup(__SCREAMING_SNAKE_CASE		)
          for movie in source.find_all('div'							,			class_='lister-item mode-advanced'		)		)


if __name__ == "__main__":
      import json

      A_ 			=		int(input("How many movies would you like to see? "))
      print(
          ", ".join(
              json.dumps(movie, indent=4) for movie in get_imdb_top_movies(num_movies)
          )
      )
