

from math import radians as angle_to_radians
from math import sin

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







def 						_snake_case		(     SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					)							->   None:

     """simple docstring"""







     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		(     SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					)							->   float:

     """simple docstring"""







     check_args(SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					)
     _lowerCAmelCase :       Optional[int]	   =     angle_to_radians(2 * angle					)
     return round(init_velocity**2 * sin(SCREAMING_SNAKE_CASE					) / g		,				2					)







def 						_snake_case		(     SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					)							->   float:

     """simple docstring"""







     check_args(SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					)
     _lowerCAmelCase :       Optional[Any]	   =     angle_to_radians(SCREAMING_SNAKE_CASE					)
     return round(init_velocity**2 * sin(SCREAMING_SNAKE_CASE					) ** 2 / (2 * g)		,				2					)







def 						_snake_case		(     SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					)							->   float:

     """simple docstring"""







     check_args(SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					)
     _lowerCAmelCase :       Dict	   =     angle_to_radians(SCREAMING_SNAKE_CASE					)
     return round(2 * init_velocity * sin(SCREAMING_SNAKE_CASE					) / g		,				2					)







def 						_snake_case		(     )							->   None:

     """simple docstring"""







     _lowerCAmelCase :       Dict	   =     25, 20
     assert horizontal_distance(SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					) == 40.97
     assert max_height(SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					) == 3.73
     assert total_time(SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE					) == 1.74


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

  testmod()

  # Get input from user
  __UpperCAmelCase     					=  float(input('Initial Velocity: ').strip())

  # Get input from user
  __UpperCAmelCase     					=  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 typing import TYPE_CHECKING

from ...utils import _LazyModule


__lowerCAmelCase									=				{'''tokenization_phobert''': ['''PhobertTokenizer''']}


if TYPE_CHECKING:
 from .tokenization_phobert import PhobertTokenizer

else:
 import sys

 __lowerCAmelCase									=				_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


