
"""simple docstring"""







def 			A_			(					lowercase						, lowercase      )     ->							str:


     """simple docstring"""







     if not isinstance(lowercase						, lowercase      ):
          raise TypeError("""plaintext must be a string"""      )
     if not isinstance(lowercase						, lowercase      ):
          raise TypeError("""key must be a string"""      )

     if not plaintext:
          raise ValueError("""plaintext is empty"""      )
     if not key:
          raise ValueError("""key is empty"""      )

     key += plaintext
     UpperCAmelCase_						:    int    					=  plaintext.lower()
     UpperCAmelCase_						:    List[str]    					=  key.lower()
     UpperCAmelCase_						:    Optional[int]    					=  0
     UpperCAmelCase_						:    List[Any]    					=  0
     UpperCAmelCase_						:    Optional[int]    					=  """"""
     while plaintext_iterator < len(lowercase      ):
          if (
              ord(plaintext[plaintext_iterator]      ) < 97
              or ord(plaintext[plaintext_iterator]      ) > 122
          ):
               ciphertext += plaintext[plaintext_iterator]
               plaintext_iterator += 1
          elif ord(key[key_iterator]      ) < 97 or ord(key[key_iterator]      ) > 122:
               key_iterator += 1
          else:
               ciphertext += chr(
                   (
                       (ord(plaintext[plaintext_iterator]      ) - 97 + ord(key[key_iterator]      ))
                       - 97
                   )
                   % 26
                   + 97      )
               key_iterator += 1
               plaintext_iterator += 1
     return ciphertext




def 			A_			(					lowercase						, lowercase      )     ->							str:


     """simple docstring"""







     if not isinstance(lowercase						, lowercase      ):
          raise TypeError("""ciphertext must be a string"""      )
     if not isinstance(lowercase						, lowercase      ):
          raise TypeError("""key must be a string"""      )

     if not ciphertext:
          raise ValueError("""ciphertext is empty"""      )
     if not key:
          raise ValueError("""key is empty"""      )

     UpperCAmelCase_						:    Any    					=  key.lower()
     UpperCAmelCase_						:    Union[str, Any]    					=  0
     UpperCAmelCase_						:    Optional[int]    					=  0
     UpperCAmelCase_						:    Any    					=  """"""
     while ciphertext_iterator < len(lowercase      ):
          if (
              ord(ciphertext[ciphertext_iterator]      ) < 97
              or ord(ciphertext[ciphertext_iterator]      ) > 122
          ):
               plaintext += ciphertext[ciphertext_iterator]
          else:
               plaintext += chr(
                   (ord(ciphertext[ciphertext_iterator]      ) - ord(key[key_iterator]      )) % 26
                   + 97      )
               key += chr(
                   (ord(ciphertext[ciphertext_iterator]      ) - ord(key[key_iterator]      )) % 26
                   + 97      )
               key_iterator += 1
          ciphertext_iterator += 1
     return plaintext


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       lowercase_						    =					int(input("Type 1 to encrypt or 2 to decrypt:"))
       if operation == 1:
              lowercase_						    =					input("Typeplaintext to be encrypted:\n")
              lowercase_						    =					input("Type the key:\n")
              print(encrypt(plaintext, key))
       elif operation == 2:
              lowercase_						    =					input("Type the ciphertext to be decrypted:\n")
              lowercase_						    =					input("Type the key:\n")
              print(decrypt(ciphertext, key))
       decrypt("jsqqs avvwo", "coffee")



"""simple docstring"""







from math import radians as angle_to_radians
from math import sin

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




def 			A_			(					lowercase						, lowercase      )     ->							None:


     """simple docstring"""







     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						, lowercase      )     ->							float:


     """simple docstring"""







     check_args(lowercase						, lowercase      )
     UpperCAmelCase_						:    Any    					=  angle_to_radians(2 * angle      )
     return round(init_velocity**2 * sin(lowercase      ) / g						, 2      )




def 			A_			(					lowercase						, lowercase      )     ->							float:


     """simple docstring"""







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




def 			A_			(					lowercase						, lowercase      )     ->							float:


     """simple docstring"""







     check_args(lowercase						, lowercase      )
     UpperCAmelCase_						:    Optional[int]    					=  angle_to_radians(lowercase      )
     return round(2 * init_velocity * sin(lowercase      ) / g						, 2      )




def 			A_			(					)     ->							None:


     """simple docstring"""







     UpperCAmelCase_					,UpperCAmelCase_						:    Optional[int]    					=  25, 20
     assert horizontal_distance(lowercase						, lowercase      ) == 40.97
     assert max_height(lowercase						, lowercase      ) == 3.73
     assert total_time(lowercase						, lowercase      ) == 1.74


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

       testmod()

       # Get input from user
       lowercase_						    =					float(input("Initial Velocity: ").strip())

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

