





from math import radians as angle_to_radians
from math import sin

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




def 			lowerCAmelCase_			(				UpperCamelCase_       ,		UpperCamelCase_	)  ->		None:

       # Ensure valid instance
       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 			lowerCAmelCase_			(				UpperCamelCase_       ,		UpperCamelCase_	)  ->		float:
       check_args(UpperCamelCase_       ,		UpperCamelCase_	)
       UpperCamelCase_ 							=	angle_to_radians(2 * angle	)
       return round(init_velocity**2 * sin(UpperCamelCase_	) / g       ,		2	)




def 			lowerCAmelCase_			(				UpperCamelCase_       ,		UpperCamelCase_	)  ->		float:
       check_args(UpperCamelCase_       ,		UpperCamelCase_	)
       UpperCamelCase_ 							=	angle_to_radians(UpperCamelCase_	)
       return round(init_velocity**2 * sin(UpperCamelCase_	) ** 2 / (2 * g)       ,		2	)




def 			lowerCAmelCase_			(				UpperCamelCase_       ,		UpperCamelCase_	)  ->		float:
       check_args(UpperCamelCase_       ,		UpperCamelCase_	)
       UpperCamelCase_ 							=	angle_to_radians(UpperCamelCase_	)
       return round(2 * init_velocity * sin(UpperCamelCase_	) / g       ,		2	)




def 			lowerCAmelCase_			(				)  ->		None:
       UpperCamelCase_							,			UpperCamelCase_ 							=	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
     _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]''')





'''simple docstring'''
from __future__ import annotations







class 					_A						:



   '''simple docstring'''






   def __init__(	self	:					Any					, lowerCamelCase	:					int						)->	None:
          snake_case__					:	Optional[int]          =					value
          snake_case__					:	Node | None          =					None
          snake_case__					:	Node | None          =					None







class 					_A						:



   '''simple docstring'''






   _lowercase    						= 42




   def __init__(	self	:					str						)->	None:
          snake_case__					:	int          =					0




   def   __lowerCAmelCase						(	self	:					Tuple					, lowerCamelCase	:					Node | None					, lowerCamelCase	:					int						)->	None:
          if node is None:
                 return

          if path_sum == self.target:
                 self.paths += 1

          if node.left:
                 self.depth_first_search(node.left					, path_sum + node.left.value						)
          if node.right:
                 self.depth_first_search(node.right					, path_sum + node.right.value						)




   def   __lowerCAmelCase						(	self	:					Tuple					, lowerCamelCase	:					Node | None					, lowerCamelCase	:					int | None = None						)->	int:
          if node is None:
                 return 0
          if target is not None:
                 snake_case__					:	Dict          =					target

          self.depth_first_search(lowerCamelCase					, node.value						)
          self.path_sum(node.left						)
          self.path_sum(node.right						)

          return self.paths


if __name__ == "__main__":
     import doctest

     doctest.testmod()




