Generation

generate functionTue, 04 Apr 2023

una funcion que genere un cufrado cesar

def cesar(text, key): alphabet = "abcdefghijklmnopqrstuvwxyz" new_text = "" for i in text: if i in alphabet: position = alphabet.index(i) new_position = (position + key) % 26 new_character = alphabet[new_position] new_text += new_character else: new_text += i return new_text

Want to kickstart your project?Use the new AI Studio to create your code