



from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
a_       :Tuple				  =				9.8_06_65
def 	lowercase_							(A		, A				):

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

       if not isinstance(A		, (int, float)				):
              raise TypeError('Invalid angle. Range is 1-90 degrees.'				)

       # Ensure valid angle
       if angle > 9_0 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_							(A		, A				):
       check_args(A		, A				)
       snake_case__							:     List[str]            =     angle_to_radians(2 * angle				)
       return round(init_velocity**2 * sin(A				) / g		, 2				)
def 	lowercase_							(A		, A				):
       check_args(A		, A				)
       snake_case__							:     int            =     angle_to_radians(A				)
       return round(init_velocity**2 * sin(A				) ** 2 / (2 * g)		, 2				)
def 	lowercase_							(A		, A				):
       check_args(A		, A				)
       snake_case__							:     Optional[int]            =     angle_to_radians(A				)
       return round(2 * init_velocity * sin(A				) / g		, 2				)
def 	lowercase_							():
       snake_case__							:     List[Any]            =     2_5, 2_0
       assert horizontal_distance(A		, A				) == 40.97
       assert max_height(A		, A				) == 3.73
       assert total_time(A		, A				) == 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]""")











def 	lowercase_							(A			:			list				):
       for i, _ in enumerate(A				):
              if (i % 2 == 1) == (nums[i - 1] > nums[i]):
                     snake_case__     ,    snake_case__							:     List[str]            =     nums[i], nums[i - 1]

       return nums


if __name__ == "__main__":
 print("Enter the array elements:")
 a_       :Tuple				  =				list(map(int, input().split()))
 print("The unsorted array is:")
 print(array)
 print("Array after Wiggle sort:")
 print(wiggle_sort(array))






