




'''simple docstring'''






from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
UpperCamelCase__:       Any							     =      9.80665


def 			snake_case_					( _lowerCAmelCase  :						int       ,				_lowerCAmelCase  :						Union[str, Any]  )				->       int:

							# Ensure valid instance
							if not isinstance(SCREAMING_SNAKE_CASE_       ,				(int, float)  ):
														raise TypeError('''Invalid velocity. Should be a positive number.'''  )

							if not isinstance(SCREAMING_SNAKE_CASE_       ,				(int, float)  ):
														raise TypeError('''Invalid angle. Range is 1-90 degrees.'''  )

							# Ensure valid angle
							if angle > 90 or angle < 1:
														raise ValueError('''Invalid angle. Range is 1-90 degrees.'''  )

							# Ensure valid velocity
							if init_velocity < 0:
														raise ValueError('''Invalid velocity. Should be a positive number.'''  )


def 			snake_case_					( _lowerCAmelCase  :						Tuple       ,				_lowerCAmelCase  :						Any  )				->       int:
							check_args(SCREAMING_SNAKE_CASE_       ,				SCREAMING_SNAKE_CASE_  )
							UpperCAmelCase			:	str										=		angle_to_radians(2 * angle  )
							return round(init_velocity**2 * sin(SCREAMING_SNAKE_CASE_  ) / g       ,				2  )


def 			snake_case_					( _lowerCAmelCase  :						str       ,				_lowerCAmelCase  :						Any  )				->       str:
							check_args(SCREAMING_SNAKE_CASE_       ,				SCREAMING_SNAKE_CASE_  )
							UpperCAmelCase			:	str										=		angle_to_radians(SCREAMING_SNAKE_CASE_  )
							return round(init_velocity**2 * sin(SCREAMING_SNAKE_CASE_  ) ** 2 / (2 * g)       ,				2  )


def 			snake_case_					( _lowerCAmelCase  :						List[Any]       ,				_lowerCAmelCase  :						int  )				->       Any:
							check_args(SCREAMING_SNAKE_CASE_       ,				SCREAMING_SNAKE_CASE_  )
							UpperCAmelCase			:	Optional[int]										=		angle_to_radians(SCREAMING_SNAKE_CASE_  )
							return round(2 * init_velocity * sin(SCREAMING_SNAKE_CASE_  ) / g       ,				2  )


def 			snake_case_					( )				->       Any:
							UpperCAmelCase							,		UpperCAmelCase			:	Union[str, Any]										=		25, 20
							assert horizontal_distance(SCREAMING_SNAKE_CASE_       ,				SCREAMING_SNAKE_CASE_  ) == 4_0.9_7
							assert max_height(SCREAMING_SNAKE_CASE_       ,				SCREAMING_SNAKE_CASE_  ) == 3.7_3
							assert total_time(SCREAMING_SNAKE_CASE_       ,				SCREAMING_SNAKE_CASE_  ) == 1.7_4


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

						testmod()

						# Get input from user
						UpperCamelCase__:       Dict							     =      float(input("Initial Velocity: ").strip())

						# Get input from user
						UpperCamelCase__:       Optional[Any]							     =      float(input("angle: ").strip())

						# Print results
						print()
						print("Results: ")
						print(F"Horizontal Distance: {horizontal_distance(init_vel, angle)!s} [m]")
						print(F"Maximum Height: {max_height(init_vel, angle)!s} [m]")
						print(F"Total Time: {total_time(init_vel, angle)!s} [s]")










'''simple docstring'''






import re


def 			snake_case_					( _lowerCAmelCase  :						List[str]  )				->       Dict:
							def docstring_decorator(_lowerCAmelCase  :						List[str]  ):
														UpperCAmelCase			:	str										=		fn.__doc__
														UpperCAmelCase			:	List[str]										=		func_doc.split('''\n'''  )
														UpperCAmelCase			:	Optional[Any]										=		0
														while i < len(_lowerCAmelCase  ) and re.search(R'''^\s*Examples?:\s*$'''       ,				lines[i]  ) is None:
																					i += 1
														if i < len(_lowerCAmelCase  ):
																					UpperCAmelCase			:	Union[str, Any]										=		example_docstring
																					UpperCAmelCase			:	Tuple										=		'''\n'''.join(_lowerCAmelCase  )
														else:
																					raise ValueError(
																					    f"""The function {fn} should have an empty 'Examples:' in its docstring as placeholder, """
																					    f"""current docstring is:\n{func_doc}"""  )
														UpperCAmelCase			:	Any										=		func_doc
														return fn

							return docstring_decorator





