
"""simple docstring"""






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


			'''simple docstring'''





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

			if not isinstance(lowercase__ ,	(int, float)						):
						raise TypeError("""Invalid angle. Range is 1-90 degrees."""						)

			# Ensure valid angle
			if angle > 9_0 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			(      lowercase__						:    float ,	lowercase__						:    float						)    ->							float:


			'''simple docstring'''





			check_args(lowercase__ ,	lowercase__						)
			lowerCAmelCase_       :List[Any]     	=    angle_to_radians(2 * angle						)
			return round(init_velocity**2 * sin(lowercase__						) / g ,	2						)






def 		_snake_case			(      lowercase__						:    float ,	lowercase__						:    float						)    ->							float:


			'''simple docstring'''





			check_args(lowercase__ ,	lowercase__						)
			lowerCAmelCase_       :List[Any]     	=    angle_to_radians(lowercase__						)
			return round(init_velocity**2 * sin(lowercase__						) ** 2 / (2 * g) ,	2						)






def 		_snake_case			(      lowercase__						:    float ,	lowercase__						:    float						)    ->							float:


			'''simple docstring'''





			check_args(lowercase__ ,	lowercase__						)
			lowerCAmelCase_       :List[Any]     	=    angle_to_radians(lowercase__						)
			return round(2 * init_velocity * sin(lowercase__						) / g ,	2						)






def 		_snake_case			(      )    ->							None:


			'''simple docstring'''





			lowerCAmelCase_	,			lowerCAmelCase_       :int     	=    2_5, 2_0
			assert horizontal_distance(lowercase__ ,	lowercase__						) == 40.97
			assert max_height(lowercase__ ,	lowercase__						) == 3.73
			assert total_time(lowercase__ ,	lowercase__						) == 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






def 		_snake_case			(      lowercase__						:    list[int | float]						)    ->							int | float:


			'''simple docstring'''





			if len(lowercase__						) == 0:
						raise ValueError("""find_min() arg is an empty sequence"""						)
			lowerCAmelCase_       :Optional[int]     	=    nums[0]
			for num in nums:
						lowerCAmelCase_       :Optional[Any]     	=    min(lowercase__ ,	lowercase__						)
			return min_num


if __name__ == "__main__":
				import doctest

				doctest.testmod(verbose=True)






