

"""simple docstring"""




from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
A_							:     List[Any]     =	9.8_06_65

def 		A    (       snake_case__						,			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 		A    (       snake_case__						,			snake_case__      ):




   '''simple docstring'''


   check_args(_lowerCAmelCase						,			_lowerCAmelCase      )
   SCREAMING_SNAKE_CASE__									= angle_to_radians(2 * angle      )
   return round(init_velocity**2 * sin(_lowerCAmelCase      ) / g						,			2      )

def 		A    (       snake_case__						,			snake_case__      ):




   '''simple docstring'''


   check_args(_lowerCAmelCase						,			_lowerCAmelCase      )
   SCREAMING_SNAKE_CASE__									= angle_to_radians(_lowerCAmelCase      )
   return round(init_velocity**2 * sin(_lowerCAmelCase      ) ** 2 / (2 * g)						,			2      )

def 		A    (       snake_case__						,			snake_case__      ):




   '''simple docstring'''


   check_args(_lowerCAmelCase						,			_lowerCAmelCase      )
   SCREAMING_SNAKE_CASE__									= angle_to_radians(_lowerCAmelCase      )
   return round(2 * init_velocity * sin(_lowerCAmelCase      ) / g						,			2      )

def 		A    (       ):




   '''simple docstring'''


   SCREAMING_SNAKE_CASE__							,						SCREAMING_SNAKE_CASE__									= 25, 20
   assert horizontal_distance(_lowerCAmelCase						,			_lowerCAmelCase      ) == 40.97
   assert max_height(_lowerCAmelCase						,			_lowerCAmelCase      ) == 3.73
   assert total_time(_lowerCAmelCase						,			_lowerCAmelCase      ) == 1.74


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

      testmod()

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

      # Get input from user
      A_							:     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"""




class 				lowerCamelCase  :

			def __init__(   self			:  Dict    )				->      None:
						SCREAMING_SNAKE_CASE__									= [0, 1]





			def    SCREAMING_SNAKE_CASE			(   self			:  Optional[int]      ,			__UpperCAmelCase			:  int    )				->      list:
						if (difference := index - (len(self.sequence    ) - 2)) >= 1:
									for _ in range(__UpperCAmelCase    ):
												self.sequence.append(self.sequence[-1] + self.sequence[-2]    )
						return self.sequence[:index]

def 		A    (       ):




			'''simple docstring'''


			print(
			    """Fibonacci Series Using Dynamic Programming\n"""						,			"""Enter the index of the Fibonacci number you want to calculate """						,			"""in the prompt below. (To exit enter exit or Ctrl-C)\n"""						,			sep=""""""						,			)
			SCREAMING_SNAKE_CASE__									= Fibonacci()

			while True:
						SCREAMING_SNAKE_CASE__									= input(""">> """      )
						if prompt in {"exit", "quit"}:
									break

						try:
									SCREAMING_SNAKE_CASE__									= int(snake_case__      )
						except ValueError:
									print("""Enter a number or 'exit'"""      )
									continue

						print(fibonacci.get(snake_case__      )      )


if __name__ == "__main__":
						main()


