"""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	:		Any   =   9.8_0_6_6_5



def       A__    (	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       A__    (	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       A__    (	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       A__    (	lowercase_     :	float      , lowercase_     :	float						)  ->							float:
   check_args(lowercase_      , lowercase_						)
   __lowerCamelCase    		=					angle_to_radians(lowercase_						)
   return round(2 * init_velocity * sin(lowercase_						) / g      , 2						)



def       A__    (	)  ->							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	:		Tuple   =   float(input('''Initial Velocity: ''').strip())

     # Get input from user
     _SCREAMING_SNAKE_CASE	:		int   =   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]")












from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_torch_available


UpperCAmelCase__    :							List[str]       		=     {
    'configuration_ernie_m': ['ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ErnieMConfig'],
}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase__    :							Any       		=     ['ErnieMTokenizer']

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase__    :							Dict       		=     [
       'ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST',
       'ErnieMForMultipleChoice',
       'ErnieMForQuestionAnswering',
       'ErnieMForSequenceClassification',
       'ErnieMForTokenClassification',
       'ErnieMModel',
       'ErnieMPreTrainedModel',
       'ErnieMForInformationExtraction',
   ]


if TYPE_CHECKING:
   from .configuration_ernie_m import ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP, ErnieMConfig

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_ernie_m import ErnieMTokenizer

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_ernie_m import (
          ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST,
          ErnieMForInformationExtraction,
          ErnieMForMultipleChoice,
          ErnieMForQuestionAnswering,
          ErnieMForSequenceClassification,
          ErnieMForTokenClassification,
          ErnieMModel,
          ErnieMPreTrainedModel,
      )


else:
   import sys

   UpperCAmelCase__    :							List[Any]       		=     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
