



from math import radians as angle_to_radians
from math import sin

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







def       lowerCamelCase_  (    _a       :						float   ,		_a       :						float    ):



    '''simple docstring'''




    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 > 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_  (    _a       :						float   ,		_a       :						float    ):



    '''simple docstring'''




    check_args(_a   ,		_a    )
    UpperCAmelCase_     :       Union[str, Any]  		=					angle_to_radians(2 * angle    )
    return round(init_velocity**2 * sin(_a    ) / g   ,		2    )







def       lowerCamelCase_  (    _a       :						float   ,		_a       :						float    ):



    '''simple docstring'''




    check_args(_a   ,		_a    )
    UpperCAmelCase_     :       int  		=					angle_to_radians(_a    )
    return round(init_velocity**2 * sin(_a    ) ** 2 / (2 * g)   ,		2    )







def       lowerCamelCase_  (    _a       :						float   ,		_a       :						float    ):



    '''simple docstring'''




    check_args(_a   ,		_a    )
    UpperCAmelCase_     :       List[str]  		=					angle_to_radians(_a    )
    return round(2 * init_velocity * sin(_a    ) / g   ,		2    )







def       lowerCamelCase_  (    ):



    '''simple docstring'''




    UpperCAmelCase_		, UpperCAmelCase_     :       Tuple  		=					25, 20
    assert horizontal_distance(_a   ,		_a    ) == 4_0.9_7
    assert max_height(_a   ,		_a    ) == 3.7_3
    assert total_time(_a   ,		_a    ) == 1.7_4


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

      testmod()

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

      # Get input from user
      UpperCamelCase_									=   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 typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCamelCase					=     {
    """configuration_led""": ["""LED_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LEDConfig"""],
    """tokenization_led""": ["""LEDTokenizer"""],
}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCamelCase					=     ["""LEDTokenizerFast"""]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCamelCase					=     [
      """LED_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """LEDForConditionalGeneration""",
      """LEDForQuestionAnswering""",
      """LEDForSequenceClassification""",
      """LEDModel""",
      """LEDPreTrainedModel""",
  ]


try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCamelCase					=     ["""TFLEDForConditionalGeneration""", """TFLEDModel""", """TFLEDPreTrainedModel"""]


if TYPE_CHECKING:
  from .configuration_led import LED_PRETRAINED_CONFIG_ARCHIVE_MAP, LEDConfig
  from .tokenization_led import LEDTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_led_fast import LEDTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_led import (
        LED_PRETRAINED_MODEL_ARCHIVE_LIST,
        LEDForConditionalGeneration,
        LEDForQuestionAnswering,
        LEDForSequenceClassification,
        LEDModel,
        LEDPreTrainedModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_led import TFLEDForConditionalGeneration, TFLEDModel, TFLEDPreTrainedModel

else:
  import sys

  UpperCamelCase					=     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






