


'''simple docstring'''


from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
UpperCAmelCase_		:       List[Any]							       =		9.80665







def       snake_case_       (  SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):







				"""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       snake_case_       (  SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):







				"""simple docstring"""





				check_args(_lowerCAmelCase							,				_lowerCAmelCase					)
				_SCREAMING_SNAKE_CASE			:	Union[str, Any]							=				angle_to_radians(2 * angle					)
				return round(init_velocity**2 * sin(_lowerCAmelCase					) / g							,				2					)







def       snake_case_       (  SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):







				"""simple docstring"""





				check_args(_lowerCAmelCase							,				_lowerCAmelCase					)
				_SCREAMING_SNAKE_CASE			:	Tuple							=				angle_to_radians(_lowerCAmelCase					)
				return round(init_velocity**2 * sin(_lowerCAmelCase					) ** 2 / (2 * g)							,				2					)







def       snake_case_       (  SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):







				"""simple docstring"""





				check_args(_lowerCAmelCase							,				_lowerCAmelCase					)
				_SCREAMING_SNAKE_CASE			:	List[str]							=				angle_to_radians(_lowerCAmelCase					)
				return round(2 * init_velocity * sin(_lowerCAmelCase					) / g							,				2					)







def       snake_case_       (  ):







				"""simple docstring"""





				_SCREAMING_SNAKE_CASE		,	_SCREAMING_SNAKE_CASE			:	Dict							=				25, 20
				assert horizontal_distance(_lowerCAmelCase							,				_lowerCAmelCase					) == 4_0.9_7
				assert max_height(_lowerCAmelCase							,				_lowerCAmelCase					) == 3.7_3
				assert total_time(_lowerCAmelCase							,				_lowerCAmelCase					) == 1.7_4


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

				testmod()

				# Get input from user
				UpperCAmelCase_		:       List[Any]							       =		float(input('Initial Velocity: ').strip())

				# Get input from user
				UpperCAmelCase_		:       Any							       =		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       snake_case_       (  SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):







				"""simple docstring"""





				_SCREAMING_SNAKE_CASE			:	Tuple							=				1
				while b > 0:
								if b & 1:
												res *= a

								a *= a
								b >>= 1

				return res







def       snake_case_       (  SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__							,				SCREAMING_SNAKE_CASE__					):







				"""simple docstring"""





				_SCREAMING_SNAKE_CASE			:	Union[str, Any]							=				1
				while b > 0:
								if b & 1:
												_SCREAMING_SNAKE_CASE			:	Tuple							=				((res % c) * (a % c)) % c

								a *= a
								b >>= 1

				return res




