'''simple docstring'''


from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
snake_case__	:     Optional[int]      =    9.80_665


def    _lowerCamelCase       ( lowerCamelCase_   :				float      ,	lowerCamelCase_   :				float  ):



     """simple docstring"""





     if not isinstance(lowerCamelCase_      ,	(int, float)  ):
          raise TypeError('Invalid velocity. Should be a positive number.'  )

     if not isinstance(lowerCamelCase_      ,	(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    _lowerCamelCase       ( lowerCamelCase_   :				float      ,	lowerCamelCase_   :				float  ):



     """simple docstring"""





     check_args(lowerCamelCase_      ,	lowerCamelCase_  )
     UpperCAmelCase_				:  Dict  = angle_to_radians(2 * angle  )
     return round(init_velocity**2 * sin(lowerCamelCase_  ) / g      ,	2  )


def    _lowerCamelCase       ( lowerCamelCase_   :				float      ,	lowerCamelCase_   :				float  ):



     """simple docstring"""





     check_args(lowerCamelCase_      ,	lowerCamelCase_  )
     UpperCAmelCase_				:  Any  = angle_to_radians(lowerCamelCase_  )
     return round(init_velocity**2 * sin(lowerCamelCase_  ) ** 2 / (2 * g)      ,	2  )


def    _lowerCamelCase       ( lowerCamelCase_   :				float      ,	lowerCamelCase_   :				float  ):



     """simple docstring"""





     check_args(lowerCamelCase_      ,	lowerCamelCase_  )
     UpperCAmelCase_				:  Any  = angle_to_radians(lowerCamelCase_  )
     return round(2 * init_velocity * sin(lowerCamelCase_  ) / g      ,	2  )


def    _lowerCamelCase       ( ):



     """simple docstring"""





     UpperCAmelCase_  ,     UpperCAmelCase_				:  Optional[Any]  = 25, 20
     assert horizontal_distance(lowerCamelCase_      ,	lowerCamelCase_  ) == 40.97
     assert max_height(lowerCamelCase_      ,	lowerCamelCase_  ) == 3.73
     assert total_time(lowerCamelCase_      ,	lowerCamelCase_  ) == 1.74


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

 testmod()

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

 # Get input from user
 snake_case__	:     int      =    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"""


def 				a__      (	_UpperCAmelCase						,  _UpperCAmelCase						,  _UpperCAmelCase						)     ->	float:

 '''simple docstring'''






 snake_case__     				=					[1 / first_term]
 snake_case__     				=					1 / first_term
 for _ in range(number_of_terms - 1						):
  first_term += common_difference
  arithmetic_progression.append(_UpperCAmelCase						)
 snake_case__     				=					[1 / step for step in arithmetic_progression]
 return sum(_UpperCAmelCase						)


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   print(sum_of_harmonic_progression(1 / 2, 2, 2))

