input: Write a function to encrypt a string using Caesar cipher.
  assert caesar_encrypt("hello", 3) == "khoor"
  assert caesar_encrypt("abc", 1) == "bcd"
  assert caesar_encrypt("xyz", 2) == "zab"
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 += chr(shifted)
              elif char.isupper():
                  if shifted > ord('Z'):
                      shifted -= 26
                  encrypted_text += chr(shifted)
          else:
              encrypted_text += char
      return encrypted_text