input: Write a python function to perform a Caesar cipher encryption.
  assert encryption('Hello World', 4) == 'Lipps Asvph'
  assert encryption('abcXYZ', 3) == 'defABC'
  assert encryption('python', 13) == 'clguba'
output: def encryption(text, shift):
      result = ""
      for char in text:
          if char.isalpha():
              shift_base = 65 if char.isupper() else 97
              result += chr((ord(char) - shift_base + shift) % 26 + shift_base)
          else:
              result += char
      return result