





'''simple docstring'''




import requests

__SCREAMING_SNAKE_CASE     :Optional[Any]       =				'''https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey='''
def 	UpperCAmelCase_							(					__lowercase							:      str       )		->       None:


     '''simple docstring'''



     _UpperCAmelCase     							=   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>''')





"""simple docstring"""






from collections.abc import Sequence



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase       ,    __UpperCAmelCase = False )  ->  float:
   if not arr:
      return 0

   lowercase__:   Any					=      0 if allow_empty_subarrays else float('''-inf''' )
   lowercase__:   Union[str, Any]					=      0.0
   for num in arr:
      lowercase__:   List[str]					=      max(0 if allow_empty_subarrays else num       ,    curr_sum + num )
      lowercase__:   int					=      max(__UpperCAmelCase       ,    __UpperCAmelCase )

   return max_sum


if __name__ == "__main__":
       from doctest import testmod

       testmod()

       __A			   = [-2, 1, -3, 4, -1, 2, 1, -5, 4]
       print(f'''{max_subarray_sum(nums) = }''')
