input: Write a function to encrypt a plaintext message with a given shift using Caesar cipher.
  assert encrypt('hello', 2) == 'jgnnq'
  assert encrypt('xyz', 3) == 'abc'
  assert encrypt('abc', 1) == 'bcd'
output: def encrypt(plaintext, shift):
      encrypted_text = ''
      for char in plaintext:
          if char.isalpha():
              shifted = ord(char) + shift
              if char.islower():
                  if shifted > ord('z'):
                      shifted -= 26
                  encrypted_text += chr(shifted)
              elif char.isupper():
                  if shifted > ord('Z'):
                      shifted -= 26
                  encrypted_text += chr(shifted)
          else:
              encrypted_text += char
      return encrypted_text