from __future__ import annotations

import requests




def        lowerCAmelCase_			(					__A							)					->    Dict:







						'''simple docstring'''


						UpperCAmelCase__								=  f"""https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty"""
						return requests.get(A_							).json()




def        lowerCAmelCase_			(					__A = 10							)					->    List[str]:







						'''simple docstring'''


						UpperCAmelCase__								=  '''https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty'''
						UpperCAmelCase__								=  requests.get(A_							).json()[:max_stories]
						return [get_hackernews_story(A_							) for story_id in story_ids]




def        lowerCAmelCase_			(					__A = 10							)					->    List[Any]:







						'''simple docstring'''


						UpperCAmelCase__								=  hackernews_top_stories(A_							)
						return "\n".join("* [{title}]({url})".format(**A_							) for story in stories							)


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




from __future__ import annotations




def        lowerCAmelCase_			(					__A,  __A,  __A,  )					->    tuple:







      '''simple docstring'''


      if (electron_conc, hole_conc, intrinsic_conc).count(0							) != 1:
            raise ValueError("You cannot supply more or less than 2 values"							)
      elif electron_conc < 0:
            raise ValueError("Electron concentration cannot be negative in a semiconductor"							)
      elif hole_conc < 0:
            raise ValueError("Hole concentration cannot be negative in a semiconductor"							)
      elif intrinsic_conc < 0:
            raise ValueError(
                "Intrinsic concentration cannot be negative in a semiconductor"							)
      elif electron_conc == 0:
            return (
                "electron_conc",
                intrinsic_conc**2 / hole_conc,
            )
      elif hole_conc == 0:
            return (
                "hole_conc",
                intrinsic_conc**2 / electron_conc,
            )
      elif intrinsic_conc == 0:
            return (
                "intrinsic_conc",
                (electron_conc * hole_conc) ** 0.5,
            )
      else:
            return (-1, -1)


if __name__ == "__main__":
      import doctest

      doctest.testmod()



