Kokoma fonction ya Python oyo e chiffrer message na nzela ya chiffre César.
Tala solution possible: ```python def caesar_encrypt(text, shift): """Ebalusaka letre moko na moko na texte na ba positions ya 'shift' na droite""" encrypted = "" pona char na texte: soki char.isalpha (): shifted_char = chr (ord (char) + shift) soki char.islower () mpe shifted_char > 'z': shifted_char = chr (ord (shifted_char) - 26) elif char.isupper () mpe shifted_char > 'Z'. : shifted_char = chr(ord(shifted_char) - 26) chiffré += shifted_char else: chiffré += char return chiffré ``` Mosala oyo ezuaka ba entrées mibale `text` na `shift`, esika `text` ezali message ya ko chiffrer mpe `shift` ezali motango ya bisika mpo na kobongola bilembo na loboko ya mobali. Fonction etonga message chiffré na ko iterer na nzela ya caractère moko na moko na `texte`, ko déplacer caractère na ba positions `shift` pe kobakisa yango na message chiffré ya sortie. Soki elembo oyo ebalusami eleki ‘z’ (na makomi moke) to ‘Z’ (na makomi minene), tosengeli kozinga yango lisusu na elembo ya liboso na alphabet na bango (mpo na makomi mike ezali ‘a ’ mpe mpo na makomi minene ‘A’) na kolanda yango na kolongolaka bisika 26. Balɛtrɛ oyo ezali na alfabɛ te etikalaka ndenge moko te na makomi oyo ekɔtisami na chiffrement. Tala ndakisa ya ndenge ya kosalela fonction: ```python text = "Mbote Mokili!" shift = 3 chiffré = caesar_encrypt(texte, shift) imprimer(encrypté) # ba sorties: Khoor Zruog! ```