


from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
UpperCAmelCase__        =				9.8_06_65
def 							UpperCAmelCase_   (				__snake_case	,		__snake_case		)	->     None:







 """simple docstring"""


 if not isinstance(__snake_case	,		(int, float)		):
  raise TypeError('''Invalid velocity. Should be a positive number.'''		)

 if not isinstance(__snake_case	,		(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 							UpperCAmelCase_   (				__snake_case	,		__snake_case		)	->     float:







 """simple docstring"""


 check_args(__snake_case	,		__snake_case		)
 _lowercase				 =angle_to_radians(2 * angle		)
 return round(init_velocity**2 * sin(__snake_case		) / g	,		2		)
def 							UpperCAmelCase_   (				__snake_case	,		__snake_case		)	->     float:







 """simple docstring"""


 check_args(__snake_case	,		__snake_case		)
 _lowercase				 =angle_to_radians(__snake_case		)
 return round(init_velocity**2 * sin(__snake_case		) ** 2 / (2 * g)	,		2		)
def 							UpperCAmelCase_   (				__snake_case	,		__snake_case		)	->     float:







 """simple docstring"""


 check_args(__snake_case	,		__snake_case		)
 _lowercase				 =angle_to_radians(__snake_case		)
 return round(2 * init_velocity * sin(__snake_case		) / g	,		2		)
def 							UpperCAmelCase_   (				)	->     None:







 """simple docstring"""


 _lowercase ,       _lowercase				 =25, 20
 assert horizontal_distance(__snake_case	,		__snake_case		) == 40.97
 assert max_height(__snake_case	,		__snake_case		) == 3.73
 assert total_time(__snake_case	,		__snake_case		) == 1.74


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]''')





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


UpperCAmelCase__        =				{
    '''configuration_flaubert''': ['''FLAUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''FlaubertConfig''', '''FlaubertOnnxConfig'''],
    '''tokenization_flaubert''': ['''FlaubertTokenizer'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase__        =				[
      '''FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''FlaubertForMultipleChoice''',
      '''FlaubertForQuestionAnswering''',
      '''FlaubertForQuestionAnsweringSimple''',
      '''FlaubertForSequenceClassification''',
      '''FlaubertForTokenClassification''',
      '''FlaubertModel''',
      '''FlaubertWithLMHeadModel''',
      '''FlaubertPreTrainedModel''',
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase__        =				[
      '''TF_FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''TFFlaubertForMultipleChoice''',
      '''TFFlaubertForQuestionAnsweringSimple''',
      '''TFFlaubertForSequenceClassification''',
      '''TFFlaubertForTokenClassification''',
      '''TFFlaubertModel''',
      '''TFFlaubertPreTrainedModel''',
      '''TFFlaubertWithLMHeadModel''',
  ]


if TYPE_CHECKING:
  from .configuration_flaubert import FLAUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, FlaubertConfig, FlaubertOnnxConfig
  from .tokenization_flaubert import FlaubertTokenizer

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_flaubert import (
        FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
        FlaubertForMultipleChoice,
        FlaubertForQuestionAnswering,
        FlaubertForQuestionAnsweringSimple,
        FlaubertForSequenceClassification,
        FlaubertForTokenClassification,
        FlaubertModel,
        FlaubertPreTrainedModel,
        FlaubertWithLMHeadModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_flaubert import (
        TF_FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFFlaubertForMultipleChoice,
        TFFlaubertForQuestionAnsweringSimple,
        TFFlaubertForSequenceClassification,
        TFFlaubertForTokenClassification,
        TFFlaubertModel,
        TFFlaubertPreTrainedModel,
        TFFlaubertWithLMHeadModel,
    )

else:
  import sys

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

