"""simple docstring"""







from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
SCREAMING_SNAKE_CASE						=    9.80665


def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""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   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





	check_args(__UpperCAmelCase  ,__UpperCAmelCase      )
	_lowercase			:     Optional[int]      					=				angle_to_radians(2 * angle      )
	return round(init_velocity**2 * sin(__UpperCAmelCase      ) / g  ,2      )


def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





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


def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





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


def   __lowerCAmelCase(		):






	"""simple docstring"""





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


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

						testmod()

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

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

import math
import random


def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





	_lowercase			:     Optional[int]      					=				d * e - 1
	_lowercase			:     int      					=				0
	_lowercase			:     Union[str, Any]      					=				0
	while p == 0:
		_lowercase			:     int      					=				random.randint(2  ,n - 1      )
		_lowercase			:     str      					=				k
		while True:
			if t % 2 == 0:
				_lowercase			:     List[Any]      					=				t // 2
				_lowercase			:     int      					=				(g**t) % n
				_lowercase			:     Tuple      					=				math.gcd(x - 1  ,__UpperCAmelCase      )
				if x > 1 and y > 1:
					_lowercase			:     List[str]      					=				y
					_lowercase			:     str      					=				n // y
					break  # find the correct factors
			else:
				break  # t is not divisible by 2, break and choose another g
	return sorted([p, q]      )


if __name__ == "__main__":
						import doctest

						doctest.testmod()



