



"""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     :  Optional[Any]										=					9.8_0665



def 				lowerCAmelCase_(      lowercase_   :							float  ,      lowercase_   :							float							)		->				None:

				# Ensure valid instance
				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 > 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_(      lowercase_   :							float  ,      lowercase_   :							float							)		->				float:
				check_args(lowercase_  ,      lowercase_							)
				_lowerCamelCase					     = angle_to_radians(2 * angle							)
				return round(init_velocity**2 * sin(lowercase_							) / g  ,      2							)



def 				lowerCAmelCase_(      lowercase_   :							float  ,      lowercase_   :							float							)		->				float:
				check_args(lowercase_  ,      lowercase_							)
				_lowerCamelCase					     = angle_to_radians(lowercase_							)
				return round(init_velocity**2 * sin(lowercase_							) ** 2 / (2 * g)  ,      2							)



def 				lowerCAmelCase_(      lowercase_   :							float  ,      lowercase_   :							float							)		->				float:
				check_args(lowercase_  ,      lowercase_							)
				_lowerCamelCase					     = angle_to_radians(lowercase_							)
				return round(2 * init_velocity * sin(lowercase_							) / g  ,      2							)



def 				lowerCAmelCase_(      )		->				None:
				_lowerCamelCase     ,   _lowerCamelCase					     = 25, 20
				assert horizontal_distance(lowercase_  ,      lowercase_							) == 4_0.9_7
				assert max_height(lowercase_  ,      lowercase_							) == 3.7_3
				assert total_time(lowercase_  ,      lowercase_							) == 1.7_4


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

			testmod()

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

			# Get input from user
			__SCREAMING_SNAKE_CASE     :  Union[str, 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 .stack import Stack



def 				lowerCAmelCase_(      lowercase_   :							str							)		->				bool:
				_lowerCamelCase					     = Stack()
				_lowerCamelCase					     = {'''(''': ''')''', '''[''': ''']''', '''{''': '''}'''}
				for bracket in parentheses:
								if bracket in bracket_pairs:
												stack.push(lowercase_							)
								elif bracket in (")", "]", "}"):
												if stack.is_empty() or bracket_pairs[stack.pop()] != bracket:
																return False
				return stack.is_empty()


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

			testmod()

			__SCREAMING_SNAKE_CASE     :  Optional[Any]										=					['''((()))''', '''((())''', '''(()))''']
			print('''Balanced parentheses demonstration:\n''')
			for example in examples:
						__SCREAMING_SNAKE_CASE     :  Any										=					'''''' if balanced_parentheses(example) else '''not '''
						print(F"""{example} is {not_str}balanced""")
