
"""simple docstring"""




from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
UpperCAmelCase__				:   Tuple   							=			9.80665

def lowercase_  (       _snake_case       ,_snake_case						):

							# Ensure valid instance
							if not isinstance(_snake_case       ,(int, float)						):
														raise TypeError("""Invalid velocity. Should be a positive number."""						)

							if not isinstance(_snake_case       ,(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_  (       _snake_case       ,_snake_case						):
							check_args(_snake_case       ,_snake_case						)
							SCREAMING_SNAKE_CASE__						:	List[str]									=       angle_to_radians(2 * angle						)
							return round(init_velocity**2 * sin(_snake_case						) / g       ,2						)

def lowercase_  (       _snake_case       ,_snake_case						):
							check_args(_snake_case       ,_snake_case						)
							SCREAMING_SNAKE_CASE__						:	int									=       angle_to_radians(_snake_case						)
							return round(init_velocity**2 * sin(_snake_case						) ** 2 / (2 * g)       ,2						)

def lowercase_  (       _snake_case       ,_snake_case						):
							check_args(_snake_case       ,_snake_case						)
							SCREAMING_SNAKE_CASE__						:	Optional[int]									=       angle_to_radians(_snake_case						)
							return round(2 * init_velocity * sin(_snake_case						) / g       ,2						)

def lowercase_  (       ):
							SCREAMING_SNAKE_CASE__						:	List[Any]									=       25, 20
							assert horizontal_distance(_snake_case       ,_snake_case						) == 40.97
							assert max_height(_snake_case       ,_snake_case						) == 3.73
							assert total_time(_snake_case       ,_snake_case						) == 1.74


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"""




import re

def lowercase_  (       _snake_case						):
							def docstring_decorator(_snake_case						):
														SCREAMING_SNAKE_CASE__						:	Any									=       fn.__doc__
														SCREAMING_SNAKE_CASE__						:	Dict									=       func_doc.split("""\n"""						)
														SCREAMING_SNAKE_CASE__						:	Any									=       0
														while i < len(_snake_case						) and re.search(R"""^\s*Examples?:\s*$"""       ,lines[i]						) is None:
																					i += 1
														if i < len(_snake_case						):
																					SCREAMING_SNAKE_CASE__						:	List[str]									=       example_docstring
																					SCREAMING_SNAKE_CASE__						:	List[Any]									=       """\n""".join(_snake_case						)
														else:
																					raise ValueError(
																					    f'''The function {fn} should have an empty \'Examples:\' in its docstring as placeholder, '''
																					    f'''current docstring is:\n{func_doc}'''						)
														SCREAMING_SNAKE_CASE__						:	int									=       func_doc
														return fn

							return docstring_decorator




