input: Write a function to implement a simple Caesar cipher encryption.
  assert caesar_encrypt("Hello World!", 5) == "Mjqqt%]twqi&"
  assert caesar_encrypt("abc", 3) == "def"
  assert caesar_encrypt("xyz", 1) == "yza"
output: def caesar_encrypt(text, shift):
      encrypted_text = []
      for char in text:
          if char.isalpha():
              shifted = ord(char) + shift
              if char.islower():
                  if shifted > ord('z'):
                      shifted -= 26
                  encrypted_text.append(chr(shifted))
              elif char.isupper():
                  if shifted > ord('Z'):
                      shifted -= 26
                  encrypted_text.append(chr(shifted))
          else:
              encrypted_text.append(chr(ord(char) + shift))
      return ''.join(encrypted_text)