





import unittest
from dataclasses import dataclass
from typing import Optional

from transformers.utils import ModelOutput



@dataclass
class       __lowerCAmelCase (    _a  ):
			lowerCamelCase_  :  float
			lowerCamelCase_  :  Optional[float]     =   None
			lowerCamelCase_  :  Optional[float]     =   None




class       __lowerCAmelCase (    unittest.TestCase  ):






			def     lowerCamelCase						(self					)  ->     Tuple:


							'''simple docstring'''



							snake_case_		:					Optional[Any]			    =						ModelOutputTest(a=30					)
							self.assertEqual(x.a      ,							30					)
							self.assertIsNone(x.b					)
							self.assertIsNone(x.c					)
							with self.assertRaises(__magic_name__					):
											snake_case_		:					str			    =						x.d






			def     lowerCamelCase						(self					)  ->     int:


							'''simple docstring'''



							snake_case_		:					str			    =						ModelOutputTest(a=30      ,							b=10					)
							self.assertEqual(x[0]      ,							30					)
							self.assertEqual(x[1]      ,							10					)
							self.assertEqual(x[:2]      ,							(30, 10)					)
							self.assertEqual(x[:]      ,							(30, 10)					)

							snake_case_		:					Optional[int]			    =						ModelOutputTest(a=30      ,							c=10					)
							self.assertEqual(x[0]      ,							30					)
							self.assertEqual(x[1]      ,							10					)
							self.assertEqual(x[:2]      ,							(30, 10)					)
							self.assertEqual(x[:]      ,							(30, 10)					)






			def     lowerCamelCase						(self					)  ->     Tuple:


							'''simple docstring'''



							snake_case_		:					int			    =						ModelOutputTest(a=30      ,							b=10					)
							self.assertEqual(x['''a''']      ,							30					)
							self.assertEqual(x['''b''']      ,							10					)
							with self.assertRaises(__magic_name__					):
											snake_case_		:					str			    =						x['''c''']

							snake_case_		:					Tuple			    =						ModelOutputTest(a=30      ,							c=10					)
							self.assertEqual(x['''a''']      ,							30					)
							self.assertEqual(x['''c''']      ,							10					)
							with self.assertRaises(__magic_name__					):
											snake_case_		:					int			    =						x['''b''']






			def     lowerCamelCase						(self					)  ->     int:


							'''simple docstring'''



							snake_case_		:					Tuple			    =						ModelOutputTest(a=30					)
							self.assertEqual(list(x.keys()					)      ,							['''a''']					)
							self.assertEqual(list(x.values()					)      ,							[30]					)
							self.assertEqual(list(x.items()					)      ,							[('''a''', 30)]					)
							self.assertEqual(list(__magic_name__					)      ,							['''a''']					)

							snake_case_		:					Optional[int]			    =						ModelOutputTest(a=30      ,							b=10					)
							self.assertEqual(list(x.keys()					)      ,							['''a''', '''b''']					)
							self.assertEqual(list(x.values()					)      ,							[30, 10]					)
							self.assertEqual(list(x.items()					)      ,							[('''a''', 30), ('''b''', 10)]					)
							self.assertEqual(list(__magic_name__					)      ,							['''a''', '''b''']					)

							snake_case_		:					Dict			    =						ModelOutputTest(a=30      ,							c=10					)
							self.assertEqual(list(x.keys()					)      ,							['''a''', '''c''']					)
							self.assertEqual(list(x.values()					)      ,							[30, 10]					)
							self.assertEqual(list(x.items()					)      ,							[('''a''', 30), ('''c''', 10)]					)
							self.assertEqual(list(__magic_name__					)      ,							['''a''', '''c''']					)

							with self.assertRaises(__magic_name__					):
											snake_case_		:					Optional[Any]			    =						x.update({'''d''': 20}					)
							with self.assertRaises(__magic_name__					):
											del x["a"]
							with self.assertRaises(__magic_name__					):
											snake_case_		:					Any			    =						x.pop('''a'''					)
							with self.assertRaises(__magic_name__					):
											snake_case_		:					List[Any]			    =						x.setdefault('''d'''      ,							32					)






			def     lowerCamelCase						(self					)  ->     List[str]:


							'''simple docstring'''



							snake_case_		:					Tuple			    =						ModelOutputTest(a=30					)
							snake_case_		:					Union[str, Any]			    =						10
							self.assertEqual(x.a      ,							10					)
							self.assertEqual(x['''a''']      ,							10					)






			def     lowerCamelCase						(self					)  ->     Tuple:


							'''simple docstring'''



							snake_case_		:					Any			    =						ModelOutputTest(a=30					)
							snake_case_		:					Tuple			    =						10
							self.assertEqual(x.a      ,							10					)
							self.assertEqual(x['''a''']      ,							10					)






			def     lowerCamelCase						(self					)  ->     Optional[int]:


							'''simple docstring'''



							snake_case_		:					Any			    =						ModelOutputTest({'''a''': 30, '''b''': 10}					)
							self.assertEqual(list(x.keys()					)      ,							['''a''', '''b''']					)
							self.assertEqual(x.a      ,							30					)
							self.assertEqual(x.b      ,							10					)






			def     lowerCamelCase						(self					)  ->     Union[str, Any]:


							'''simple docstring'''



							snake_case_		:					List[Any]			    =						ModelOutputTest([('''a''', 30), ('''b''', 10)]					)
							self.assertEqual(list(x.keys()					)      ,							['''a''', '''b''']					)
							self.assertEqual(x.a      ,							30					)
							self.assertEqual(x.b      ,							10					)

							with self.assertRaises(__magic_name__					):
											snake_case_		:					int			    =						ModelOutputTest([('''a''', 30), (10, 10)]					)

							snake_case_		:					Optional[Any]			    =						ModelOutputTest(a=(30, 30)					)
							self.assertEqual(list(x.keys()					)      ,							['''a''']					)
							self.assertEqual(x.a      ,							(30, 30)					)







from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
lowerCAmelCase_												=       9.80_665






def   lowerCamelCase_		(       _UpperCamelCase				,       _UpperCamelCase				)	->		None:






				"""simple docstring"""


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

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






				"""simple docstring"""


				check_args(_UpperCamelCase				,       _UpperCamelCase				)
				snake_case_		:					List[str]			    =						angle_to_radians(2 * angle				)
				return round(init_velocity**2 * sin(_UpperCamelCase				) / g				,       2				)






def   lowerCamelCase_		(       _UpperCamelCase				,       _UpperCamelCase				)	->		float:






				"""simple docstring"""


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






def   lowerCamelCase_		(       _UpperCamelCase				,       _UpperCamelCase				)	->		float:






				"""simple docstring"""


				check_args(_UpperCamelCase				,       _UpperCamelCase				)
				snake_case_		:					Optional[Any]			    =						angle_to_radians(_UpperCamelCase				)
				return round(2 * init_velocity * sin(_UpperCamelCase				) / g				,       2				)






def   lowerCamelCase_		(       )	->		None:






				"""simple docstring"""


				snake_case_    ,							snake_case_		:					Dict			    =						25, 20
				assert horizontal_distance(_UpperCamelCase				,       _UpperCamelCase				) == 40.97
				assert max_height(_UpperCamelCase				,       _UpperCamelCase				) == 3.73
				assert total_time(_UpperCamelCase				,       _UpperCamelCase				) == 1.74


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

	testmod()

	# Get input from user
	lowerCAmelCase_												=       float(input('''Initial Velocity: ''').strip())

	# Get input from user
	lowerCAmelCase_												=       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]''')
