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











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


