

from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
__A    	=			9.8_0665



def    snake_case_(_UpperCamelCase				, _UpperCamelCase  )							->			None:



  """simple docstring"""






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

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



  """simple docstring"""






  check_args(_UpperCamelCase				, _UpperCamelCase  )
  _snake_case		=							angle_to_radians(2 * angle  )
  return round(init_velocity**2 * sin(_UpperCamelCase  ) / g				, 2  )



def    snake_case_(_UpperCamelCase				, _UpperCamelCase  )							->			float:



  """simple docstring"""






  check_args(_UpperCamelCase				, _UpperCamelCase  )
  _snake_case		=							angle_to_radians(_UpperCamelCase  )
  return round(init_velocity**2 * sin(_UpperCamelCase  ) ** 2 / (2 * g)				, 2  )



def    snake_case_(_UpperCamelCase				, _UpperCamelCase  )							->			float:



  """simple docstring"""






  check_args(_UpperCamelCase				, _UpperCamelCase  )
  _snake_case		=							angle_to_radians(_UpperCamelCase  )
  return round(2 * init_velocity * sin(_UpperCamelCase  ) / g				, 2  )



def    snake_case_()							->			None:



  """simple docstring"""






  _snake_case,  _snake_case		=							25, 20
  assert horizontal_distance(_UpperCamelCase				, _UpperCamelCase  ) == 40.97
  assert max_height(_UpperCamelCase				, _UpperCamelCase  ) == 3.73
  assert total_time(_UpperCamelCase				, _UpperCamelCase  ) == 1.74


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

 testmod()

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

 # Get input from user
 __A    	=			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



def    snake_case_(_UpperCamelCase  )							->			int | float:



  """simple docstring"""






  if len(_UpperCamelCase  ) == 0:
    raise ValueError('''find_max() arg is an empty sequence'''  )
  _snake_case		=							nums[0]
  for x in nums:
    if x > max_num:
      _snake_case		=							x
  return max_num


if __name__ == "__main__":
 import doctest

 doctest.testmod(verbose=True)

