



'''simple docstring'''







from __future__ import annotations

from enum import Enum, unique
from typing import TypeVar

# Create a generic variable that can be 'Enum', or any subclass.
lowercase__     :  List[str]    					=			TypeVar('T', bound='Enum')

@unique
class       lowerCamelCase_							(	lowerCAmelCase_  ):






   '''simple docstring'''

   A :     List[str]				=	80
   A :     Optional[Any]				=	70
   A :     Optional[int]				=	60
   A :     Optional[Any]				=	50
   A :     Tuple				=	40
   A :     List[str]				=	30
   A :     List[str]				=	20
   A :     Optional[Any]				=	10

@unique
class       lowerCamelCase_							(	lowerCAmelCase_  ):






   '''simple docstring'''

   A :     int				=	24
   A :     Union[str, Any]				=	21
   A :     Dict				=	18
   A :     str				=	15
   A :     str				=	12
   A :     Optional[Any]				=	9
   A :     List[Any]				=	6
   A :     Dict				=	3
   A :     Union[str, Any]				=	2
   A :     Union[str, Any]				=	1
   A :     int				=	-1
   A :     List[str]				=	-2
   A :     Any				=	-3
   A :     Optional[int]				=	-6
   A :     List[Any]				=	-9
   A :     List[Any]				=	-12
   A :     Optional[Any]				=	-15
   A :     int				=	-18
   A :     Optional[int]				=	-21
   A :     List[str]				=	-24


   @classmethod
   def 	_UpperCamelCase       (  cls ):
       return {unit.name: unit.value for unit in cls if unit.value > 0}







   @classmethod
   def 	_UpperCamelCase       (  cls ):
       return {unit.name: unit.value for unit in cls if unit.value < 0}





def 						snake_case__ (lowerCAmelCase_	):
    UpperCamelCase__      =			SIUnit.get_positive() if value > 0 else SIUnit.get_negative()
    for name_prefix, value_prefix in prefixes.items():
        UpperCamelCase__      =			value / (10**value_prefix)
        if numerical_part > 1:
            return F'{numerical_part!s} {name_prefix}'
    return str(lowerCAmelCase_	)





def 						snake_case__ (lowerCAmelCase_	):
    for prefix in BinaryUnit:
        UpperCamelCase__      =			value / (2**prefix.value)
        if numerical_part > 1:
            return F'{numerical_part!s} {prefix.name}'
    return str(lowerCAmelCase_	)


if __name__ == "__main__":
      import doctest

      doctest.testmod()









'''simple docstring'''







from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
lowercase__     :  str    					=			9.8_0_6_6_5





def 						snake_case__ (lowerCAmelCase_					,  lowerCAmelCase_	):

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





def 						snake_case__ (lowerCAmelCase_					,  lowerCAmelCase_	):
    check_args(lowerCAmelCase_					,  lowerCAmelCase_	)
    UpperCamelCase__      =			angle_to_radians(lowerCAmelCase_	)
    return round(init_velocity**2 * sin(lowerCAmelCase_	) ** 2 / (2 * g)					,  2	)





def 						snake_case__ (lowerCAmelCase_					,  lowerCAmelCase_	):
    check_args(lowerCAmelCase_					,  lowerCAmelCase_	)
    UpperCamelCase__      =			angle_to_radians(lowerCAmelCase_	)
    return round(2 * init_velocity * sin(lowerCAmelCase_	) / g					,  2	)





def 						snake_case__ ():
    UpperCamelCase__    ,  UpperCamelCase__      =			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
      lowercase__     :  Union[str, Any]    					=			float(input('Initial Velocity: ').strip())

      # Get input from user
      lowercase__     :  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]''')




