'''simple docstring'''

from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
_lowerCamelCase :				Optional[Any]														= 9.80_665



def  _lowerCAmelCase				(				__a			,      __a      )  ->      None:
     '''simple docstring'''







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

     if not isinstance(__a			,      (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				(				__a			,      __a      )  ->      float:
     '''simple docstring'''







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



def  _lowerCAmelCase				(				__a			,      __a      )  ->      float:
     '''simple docstring'''







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



def  _lowerCAmelCase				(				__a			,      __a      )  ->      float:
     '''simple docstring'''







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



def  _lowerCAmelCase				(				)  ->      None:
     '''simple docstring'''







     _UpperCamelCase       ,      _UpperCamelCase  :Any       =25, 20
     assert horizontal_distance(__a			,      __a      ) == 40.97
     assert max_height(__a			,      __a      ) == 3.73
     assert total_time(__a			,      __a      ) == 1.74


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

      testmod()

      # Get input from user
      _lowerCamelCase :				List[str]														= float(input("""Initial Velocity: """).strip())

      # Get input from user
      _lowerCamelCase :				str														= 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'''


lowercase											=      (1, 153, 370, 371, 1_634, 24_678_051, 115_132_219_018_763_992_565_095_597_973_971_522_401)
lowercase											=      (-153, -1, 0, 1.2, 200, "A", [], {}, None)






def 			UpperCAmelCase_							(		lowercase__							):


     '''simple docstring'''







     if not isinstance(lowercase__							,						lowercase__							) or n < 1:
          return False

     # Initialization of sum and number of digits.
     a_									=0
     a_									=0
     a_									=n
     # Calculation of digits of the number
     while temp > 0:
          number_of_digits += 1
          temp //= 1_0
     # Dividing number into separate digits and find Armstrong number
     a_									=n
     while temp > 0:
          a_									=temp % 1_0
          total += rem**number_of_digits
          temp //= 1_0
     return n == total






def 			UpperCAmelCase_							(		lowercase__							):


     '''simple docstring'''







     if not isinstance(lowercase__							,						lowercase__							) or n < 1:
          return False

     # Init a "histogram" of the digits
     a_									=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     a_									=0
     a_									=0
     a_									=n
     while temp > 0:
          a_		,    a_									=divmod(lowercase__							,						1_0							)
          digit_histogram[rem] += 1
          digit_total += 1

     for cnt, i in zip(lowercase__							,						range(len(lowercase__							)							)							):
          total += cnt * i**digit_total

     return n == total






def 			UpperCAmelCase_							(		lowercase__							):


     '''simple docstring'''







     if not isinstance(lowercase__							,						lowercase__							) or n < 1:
          return False
     a_									=len(str(lowercase__							)							)  # the power that all digits will be raised to
     # check if sum of each digit multiplied expo times is equal to number
     return n == sum(int(lowercase__							) ** expo for i in str(lowercase__							)							)






def 			UpperCAmelCase_							(		):


     '''simple docstring'''







     a_									=int(input("Enter an integer to see if it is an Armstrong number: "							).strip()							)
     print(F"""{num} is {'' if armstrong_number(lowercase__							) else 'not '}an Armstrong number."""							)
     print(F"""{num} is {'' if narcissistic_number(lowercase__							) else 'not '}an Armstrong number."""							)
     print(F"""{num} is {'' if pluperfect_number(lowercase__							) else 'not '}an Armstrong number."""							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()


