




'''simple docstring'''





from __future__ import annotations

import math

__UpperCAmelCase       =		"2020.9.26"
__UpperCAmelCase       =		"xcodz-dot, cclaus, dhruvmanila"





def       lowerCAmelCase_     (					__A						:							int ,			__A						:							str ,			__A						:							Union[str, Any] ,			__A						:							Any ,			__A						:							Dict ):




			'''simple docstring'''


			if not all(isinstance(SCREAMING_SNAKE_CASE_ ,			(float, int) ) for val in locals().values() ):
						snake_case:       Dict        =       f"""Input values must either be float or int: {list(locals().values() )}"""
						raise TypeError(SCREAMING_SNAKE_CASE_ )
			snake_case:       int        =       ((x * distance) / (z + distance)) * scale
			snake_case:       Union[str, Any]        =       ((y * distance) / (z + distance)) * scale
			return projected_x, projected_y





def       lowerCAmelCase_     (					__A						:							str ,			__A						:							List[Any] ,			__A						:							Tuple ,			__A						:							Tuple ,			__A						:							Union[str, Any] ):




			'''simple docstring'''


			if not isinstance(SCREAMING_SNAKE_CASE_ ,			SCREAMING_SNAKE_CASE_ ):
						raise TypeError('Axis must be a str' )
			snake_case:       Optional[Any]        =       locals()
			del input_variables["axis"]
			if not all(isinstance(SCREAMING_SNAKE_CASE_ ,			(float, int) ) for val in input_variables.values() ):
						snake_case:       Optional[Any]        =       (
						    'Input values except axis must either be float or int: '
						    f"""{list(input_variables.values() )}"""
						)
						raise TypeError(SCREAMING_SNAKE_CASE_ )
			snake_case:       List[Any]        =       (angle % 3_60) / 4_50 * 1_80 / math.pi
			if axis == "z":
						snake_case:       int        =       x * math.cos(SCREAMING_SNAKE_CASE_ ) - y * math.sin(SCREAMING_SNAKE_CASE_ )
						snake_case:       List[Any]        =       y * math.cos(SCREAMING_SNAKE_CASE_ ) + x * math.sin(SCREAMING_SNAKE_CASE_ )
						snake_case:       Any        =       z
			elif axis == "x":
						snake_case:       Optional[Any]        =       y * math.cos(SCREAMING_SNAKE_CASE_ ) - z * math.sin(SCREAMING_SNAKE_CASE_ )
						snake_case:       Optional[Any]        =       z * math.cos(SCREAMING_SNAKE_CASE_ ) + y * math.sin(SCREAMING_SNAKE_CASE_ )
						snake_case:       str        =       x
			elif axis == "y":
						snake_case:       Dict        =       x * math.cos(SCREAMING_SNAKE_CASE_ ) - z * math.sin(SCREAMING_SNAKE_CASE_ )
						snake_case:       Optional[Any]        =       z * math.cos(SCREAMING_SNAKE_CASE_ ) + x * math.sin(SCREAMING_SNAKE_CASE_ )
						snake_case:       List[Any]        =       y
			else:
						raise ValueError('not a valid axis, choose one of \'x\', \'y\', \'z\'' )

			return new_x, new_y, new_z


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			print(F'{convert_to_ad(1.0, 2.0, 3.0, 10.0, 10.0) = }')
			print(F'{rotate(1.0, 2.0, 3.0, "y", 90.0) = }')
'''simple docstring'''


import requests

__snake_case						  =		"""https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey="""

def   A_      (       SCREAMING_SNAKE_CASE_						)			->None:
  # fetching a list of articles in json format
  lowercase_     =       requests.get(_NEWS_API + bbc_news_api_key						).json()
  # each article in the list is a dict
  for i, article in enumerate(bbc_news_page["""articles"""] ,	1						):
    print(f"""{i}.) {article["title"]}"""						)


if __name__ == "__main__":
       fetch_bbc_news(bbc_news_api_key="""<Your BBC News API key goes here>""")

