


from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
_snake_case				=			9.80665







def 	A (		A__		,		A__			):

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

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

     # Ensure valid angle
     if angle > 9_0 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 	A (		A__		,		A__			):
     check_args(A__		,		A__			)
     UpperCAmelCase    :					str			=      angle_to_radians(2 * angle			)
     return round(init_velocity**2 * sin(A__			) / g		,		2			)







def 	A (		A__		,		A__			):
     check_args(A__		,		A__			)
     UpperCAmelCase    :					Dict			=      angle_to_radians(A__			)
     return round(init_velocity**2 * sin(A__			) ** 2 / (2 * g)		,		2			)







def 	A (		A__		,		A__			):
     check_args(A__		,		A__			)
     UpperCAmelCase    :					int			=      angle_to_radians(A__			)
     return round(2 * init_velocity * sin(A__			) / g		,		2			)







def 	A (		):
     UpperCAmelCase	,			UpperCAmelCase    :					Union[str, Any]			=      2_5, 2_0
     assert horizontal_distance(A__		,		A__			) == 40.97
     assert max_height(A__		,		A__			) == 3.73
     assert total_time(A__		,		A__			) == 1.74


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

      testmod()

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

      # Get input from user
      _snake_case				=			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]''')







from __future__ import annotations

import sys







def 	A (		A__		,		A__			):
     # base cases
     if abs(A__			) == 1:
          return a, 0
     elif abs(A__			) == 1:
          return 0, b

     UpperCAmelCase	,			UpperCAmelCase    :					Any			=      a, b
     UpperCAmelCase	,			UpperCAmelCase    :					List[Any]			=      1, 0
     UpperCAmelCase	,			UpperCAmelCase    :					Union[str, Any]			=      0, 1

     while remainder != 0:
          UpperCAmelCase    :					Union[str, Any]			=      old_remainder // remainder
          UpperCAmelCase	,			UpperCAmelCase    :					Dict			=      remainder, old_remainder - quotient * remainder
          UpperCAmelCase	,			UpperCAmelCase    :					int			=      coeff_a, old_coeff_a - quotient * coeff_a
          UpperCAmelCase	,			UpperCAmelCase    :					Optional[Any]			=      coeff_b, old_coeff_b - quotient * coeff_b

     # sign correction for negative numbers
     if a < 0:
          UpperCAmelCase    :					Union[str, Any]			=      -old_coeff_a
     if b < 0:
          UpperCAmelCase    :					int			=      -old_coeff_b

     return old_coeff_a, old_coeff_b







def 	A (		):
     if len(sys.argv			) < 3:
          print("2 integer arguments required"			)
          return 1
     UpperCAmelCase    :					Union[str, Any]			=      int(sys.argv[1]			)
     UpperCAmelCase    :					Any			=      int(sys.argv[2]			)
     print(extended_euclidean_algorithm(A__		,		A__			)			)
     return 0


if __name__ == "__main__":
      raise SystemExit(main())



