"""simple docstring"""


from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
a							=9.80_665





def       lowerCamelCase_			( __lowerCAmelCase       ,   __lowerCAmelCase    )							-> None:




						'''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       ,   __lowerCAmelCase    )							-> float:




						'''simple docstring'''



						check_args(__lowerCAmelCase       ,   __lowerCAmelCase    )
						lowerCamelCase__ =angle_to_radians(2 * angle    )
						return round(init_velocity**2 * sin(__lowerCAmelCase    ) / g       ,   2    )





def       lowerCamelCase_			( __lowerCAmelCase       ,   __lowerCAmelCase    )							-> float:




						'''simple docstring'''



						check_args(__lowerCAmelCase       ,   __lowerCAmelCase    )
						lowerCamelCase__ =angle_to_radians(__lowerCAmelCase    )
						return round(init_velocity**2 * sin(__lowerCAmelCase    ) ** 2 / (2 * g)       ,   2    )





def       lowerCamelCase_			( __lowerCAmelCase       ,   __lowerCAmelCase    )							-> float:




						'''simple docstring'''



						check_args(__lowerCAmelCase       ,   __lowerCAmelCase    )
						lowerCamelCase__ =angle_to_radians(__lowerCAmelCase    )
						return round(2 * init_velocity * sin(__lowerCAmelCase    ) / g       ,   2    )





def       lowerCamelCase_			( )							-> None:




						'''simple docstring'''



						lowerCamelCase__ ,				lowerCamelCase__ =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
	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]''')



"""simple docstring"""


from __future__ import annotations





def       lowerCamelCase_			( __lowerCAmelCase    )							-> int | float:




						'''simple docstring'''



						lowerCamelCase__ =sorted(__lowerCAmelCase    )
						lowerCamelCase__ =len(__lowerCAmelCase    )
						lowerCamelCase__ =length >> 1
						return (
						    (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
						    if length % 2 == 0
						    else sorted_list[mid_index]
						)





def       lowerCamelCase_			( )							-> Tuple:




						'''simple docstring'''



						import doctest

						doctest.testmod()


if __name__ == "__main__":
	main()


