





'''simple docstring'''






from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
__UpperCamelCase      :   Union[str, Any]								=     9.80_665





def      lowercase  (  lowerCAmelCase :						float   , lowerCAmelCase :						float):



				"""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      lowercase  (  lowerCAmelCase :						float   , lowerCAmelCase :						float):



				"""simple docstring"""


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





def      lowercase  (  lowerCAmelCase :						float   , lowerCAmelCase :						float):



				"""simple docstring"""


				check_args(lowerCAmelCase   , lowerCAmelCase)
				_A :				Optional[int]				=  angle_to_radians(lowerCAmelCase)
				return round(init_velocity**2 * sin(lowerCAmelCase) ** 2 / (2 * g)   , 2)





def      lowercase  (  lowerCAmelCase :						float   , lowerCAmelCase :						float):



				"""simple docstring"""


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





def      lowercase  (  ):



				"""simple docstring"""


				_A	,       _A :				Any				=  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      :   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'''






from .hash_table import HashTable
from .number_theory.prime_numbers import is_prime, next_prime



class  lowerCamelCase__				(						snake_case_						):


	"""simple docstring"""





	def __init__(					self   ,     *UpperCAmelCase__   ,     **UpperCAmelCase__			)       ->				Optional[int]:
					super().__init__(*UpperCAmelCase__   ,     **UpperCAmelCase__			)




	def 				_lowerCamelCase				(					self   ,     UpperCAmelCase__   ,     UpperCAmelCase__			)       ->				Optional[int]:
					_A :				Union[str, Any]				=  (
					    next_prime(value % self.size_table			)
					    if not is_prime(value % self.size_table			)
					    else value % self.size_table
					)  # gt = bigger than
					return next_prime_gt - (data % next_prime_gt)




	def 				_lowerCamelCase				(					self   ,     UpperCAmelCase__   ,     UpperCAmelCase__   ,     UpperCAmelCase__			)       ->				Union[str, Any]:
					return (increment * self.__hash_function_a(UpperCAmelCase__   ,     UpperCAmelCase__			)) % self.size_table




	def 				_lowerCamelCase				(					self   ,     UpperCAmelCase__   ,     UpperCAmelCase__=None			)       ->				List[Any]:
					_A :				Optional[int]				=  1
					_A :				Optional[int]				=  self.hash_function(UpperCAmelCase__			)

					while self.values[new_key] is not None and self.values[new_key] != key:
									_A :				int				=  (
									    self.__hash_double_function(UpperCAmelCase__   ,     UpperCAmelCase__   ,     UpperCAmelCase__			)
									    if self.balanced_factor() >= self.lim_charge
									    else None
									)
									if new_key is None:
													break
									else:
													i += 1

					return new_key
