



'''simple docstring'''






from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
A_				:					Dict							=      9.8_0665




def        snake_case_   (	lowerCAmelCase_			,  lowerCAmelCase_						)->						None:





       '''simple docstring'''


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





       '''simple docstring'''


       check_args(lowerCAmelCase_			,  lowerCAmelCase_						)
       _UpperCAmelCase    :		Dict     	=					angle_to_radians(2 * angle						)
       return round(init_velocity**2 * sin(lowerCAmelCase_						) / g			,  2						)




def        snake_case_   (	lowerCAmelCase_			,  lowerCAmelCase_						)->						float:





       '''simple docstring'''


       check_args(lowerCAmelCase_			,  lowerCAmelCase_						)
       _UpperCAmelCase    :		Tuple     	=					angle_to_radians(lowerCAmelCase_						)
       return round(init_velocity**2 * sin(lowerCAmelCase_						) ** 2 / (2 * g)			,  2						)




def        snake_case_   (	lowerCAmelCase_			,  lowerCAmelCase_						)->						float:





       '''simple docstring'''


       check_args(lowerCAmelCase_			,  lowerCAmelCase_						)
       _UpperCAmelCase    :		Any     	=					angle_to_radians(lowerCAmelCase_						)
       return round(2 * init_velocity * sin(lowerCAmelCase_						) / g			,  2						)




def        snake_case_   (	)->						None:





       '''simple docstring'''


       _UpperCAmelCase	,_UpperCAmelCase    :		Optional[int]     	=					25, 20
       assert horizontal_distance(lowerCAmelCase_			,  lowerCAmelCase_						) == 4_0.9_7
       assert max_height(lowerCAmelCase_			,  lowerCAmelCase_						) == 3.7_3
       assert total_time(lowerCAmelCase_			,  lowerCAmelCase_						) == 1.7_4


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

   testmod()

   # Get input from user
   A_				:					Optional[int]							=      float(input("""Initial Velocity: """).strip())

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








'''simple docstring'''


from dataclasses import dataclass
from typing import Callable, Optional

import datasets







@dataclass
class 						UpperCAmelCase						(		datasets.BuilderConfig):


 '''simple docstring'''




 __magic_name__       :			Optional[Callable]	=   None
 __magic_name__       :			Optional[dict]	=   None
 __magic_name__       :			Optional[datasets.Features]	=   None




 def    lowercase_	( self)			->   List[Any]:



      """simple docstring"""







      assert self.generator is not None, "generator must be specified"

      if self.gen_kwargs is None:
           a_									={}







class 						UpperCAmelCase						(		datasets.GeneratorBasedBuilder):


 '''simple docstring'''




 __magic_name__       :			Tuple	=   GeneratorConfig




 def    lowercase_	( self)			->   Tuple:



      """simple docstring"""







      return datasets.DatasetInfo(features=self.config.features)




 def    lowercase_	( self				,	lowerCAmelCase_)			->   int:



      """simple docstring"""







      return [datasets.SplitGenerator(name=datasets.Split.TRAIN				,	gen_kwargs=self.config.gen_kwargs)]




 def    lowercase_	( self				,	**lowerCAmelCase_)			->   List[Any]:



      """simple docstring"""







      for idx, ex in enumerate(self.config.generator(**lowerCAmelCase_)):
           yield idx, ex


