




"""simple docstring"""







from math import radians as angle_to_radians
from math import sin

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





def 							lowercase   (snake_case__				:	float ,    snake_case__				:	float	)       ->					Tuple:


				'''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 							lowercase   (snake_case__				:	float ,    snake_case__				:	float	)       ->					str:


				'''simple docstring'''






				check_args(snake_case__ ,    snake_case__	)
				lowerCAmelCase		=			angle_to_radians(2 * angle	)
				return round(init_velocity**2 * sin(snake_case__	) / g ,    2	)





def 							lowercase   (snake_case__				:	float ,    snake_case__				:	float	)       ->					Dict:


				'''simple docstring'''






				check_args(snake_case__ ,    snake_case__	)
				lowerCAmelCase		=			angle_to_radians(snake_case__	)
				return round(init_velocity**2 * sin(snake_case__	) ** 2 / (2 * g) ,    2	)





def 							lowercase   (snake_case__				:	float ,    snake_case__				:	float	)       ->					Any:


				'''simple docstring'''






				check_args(snake_case__ ,    snake_case__	)
				lowerCAmelCase		=			angle_to_radians(snake_case__	)
				return round(2 * init_velocity * sin(snake_case__	) / g ,    2	)





def 							lowercase   ()       ->					str:


				'''simple docstring'''






				lowerCAmelCase		=			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
		a								=							float(input('Initial Velocity: ').strip())

		# Get input from user
		a								=							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"""







import warnings

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding






class  SCREAMING_SNAKE_CASE__   (   _a   ):
						_a        =  ['image_processor', 'tokenizer']
						_a        =  'VideoMAEImageProcessor'
						_a        =  ('CLIPTokenizer', 'CLIPTokenizerFast')


						def __init__(							self			:     Union[str, Any]  ,  lowerCAmelCase			:     Optional[Any]=None  ,  lowerCAmelCase			:     Tuple=None  ,  **lowerCAmelCase			:     List[str]   ):
										lowerCAmelCase		=			None
										if "feature_extractor" in kwargs:
														warnings.warn(
														    """The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`"""
														    """ instead."""  ,  lowerCAmelCase  ,  )
														lowerCAmelCase		=			kwargs.pop("""feature_extractor"""   )

										lowerCAmelCase		=			image_processor if image_processor is not None else feature_extractor
										if image_processor is None:
														raise ValueError("""You need to specify an `image_processor`."""   )
										if tokenizer is None:
														raise ValueError("""You need to specify a `tokenizer`."""   )

										super().__init__(lowerCAmelCase  ,  lowerCAmelCase   )
										lowerCAmelCase		=			self.image_processor


						def __call__(							self			:     Union[str, Any]  ,  lowerCAmelCase			:     str=None  ,  lowerCAmelCase			:     Tuple=None  ,  lowerCAmelCase			:     int=None  ,  **lowerCAmelCase			:     str   ):

										if text is None and videos is None:
														raise ValueError("""You have to specify either text or videos. Both cannot be none."""   )

										if text is not None:
														lowerCAmelCase		=			self.tokenizer(lowerCAmelCase  ,  return_tensors=lowerCAmelCase  ,  **lowerCAmelCase   )

										if videos is not None:
														lowerCAmelCase		=			self.image_processor(lowerCAmelCase  ,  return_tensors=lowerCAmelCase  ,  **lowerCAmelCase   )

										if text is not None and videos is not None:
														lowerCAmelCase		=			image_features.pixel_values
														return encoding
										elif text is not None:
														return encoding
										else:
														return BatchEncoding(data=dict(**lowerCAmelCase   )  ,  tensor_type=lowerCAmelCase   )


						def 					__lowercase	(							self			:     str  ,  *lowerCAmelCase			:     List[str]  ,  **lowerCAmelCase			:     int   ):
										return self.tokenizer.batch_decode(*lowerCAmelCase  ,  **lowerCAmelCase   )


						def 					__lowercase	(							self			:     List[str]  ,  *lowerCAmelCase			:     Any  ,  **lowerCAmelCase			:     List[Any]   ):
										return self.tokenizer.decode(*lowerCAmelCase  ,  **lowerCAmelCase   )


						@property
						def 					__lowercase	(							self			:     Dict   ):
										return ["input_ids", "attention_mask", "position_ids", "pixel_values"]


						@property
						def 					__lowercase	(							self			:     List[str]   ):
										warnings.warn(
										    """`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead."""  ,  lowerCAmelCase  ,  )
										return self.image_processor_class




						@property
						def 					__lowercase	(							self			:     Tuple   ):
										warnings.warn(
										    """`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead."""  ,  lowerCAmelCase  ,  )
										return self.image_processor





