



'''simple docstring'''





from __future__ import annotations

import requests

def        a_     (							_lowerCAmelCase       )      ->      dict:
  __lowerCamelCase       :       int           = F'https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty'
  return requests.get(_lowerCAmelCase       ).json()

def        a_     (							_lowerCAmelCase = 10       )      ->      list[dict]:
  __lowerCamelCase       :       Optional[Any]           = 'https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty'
  __lowerCamelCase       :       Union[str, Any]           = requests.get(_lowerCAmelCase       ).json()[:max_stories]
  return [get_hackernews_story(_lowerCAmelCase       ) for story_id in story_ids]

def        a_     (							_lowerCAmelCase = 10       )      ->      str:
  __lowerCamelCase       :       Optional[Any]           = hackernews_top_stories(_lowerCAmelCase       )
  return "\n".join('* [{title}]({url})'.format(**_lowerCAmelCase       ) for story in stories       )


if __name__ == "__main__":
   print(hackernews_top_stories_as_markdown())











'''simple docstring'''





def        a_     (							_lowerCAmelCase       )      ->      list:
  if n_term == "":
    return []
  __lowerCamelCase       :       list           = []
  for temp in range(int(_lowerCAmelCase       )       ):
    series.append(F'1/{temp + 1}' if series else '1'       )
  return series


if __name__ == "__main__":
   _UpperCamelCase											=						input('Enter the last number (nth term) of the Harmonic Series')
   print('Formula of Harmonic Series => 1+1/2+1/3 ..... 1/n')
   print(harmonic_series(nth_term))






