





'''simple docstring'''




import requests

_A:					Optional[Any]							=				"""https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey="""







def _lowerCAmelCase     (      _lowerCAmelCase    )->     None:
 # fetching a list of articles in json format
 __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 __future__ import annotations







def _lowerCAmelCase     (      _lowerCAmelCase    )->     int:
 if not nums:
  return 0
 __UpperCAmelCase					=   nums[0]
 __UpperCAmelCase					=   0
 for num in nums[1:]:
  __UpperCAmelCase					,    __UpperCAmelCase					=   (
      max_excluding + num,
      max(_lowerCAmelCase       ,    _lowerCAmelCase    ),
  )
 return max(_lowerCAmelCase       ,    _lowerCAmelCase    )


if __name__ == "__main__":
    import doctest

    doctest.testmod()





