input: Write a function to encrypt text using the Caesar cipher.
  assert encrypt_caesar('abc', 2) == 'cde'
  assert encrypt_caesar('xyz', 3) == 'abc'
  assert encrypt_caesar('Hello, World!', 5) == 'Mjqqt, Btwqi!'
output: def encrypt_caesar(text, shift):
      result = []
      for char in text:
          if char.isalpha():
              shift_base = ord('A') if char.isupper() else ord('a')
              result.append(chr((ord(char) - shift_base + shift) % 26 + shift_base))
          else:
              result.append(char)
      return ''.join(result)