Find Jobs
Hire Freelancers

Crypto Python

$10-30 USD

En curso
Publicado hace más de 6 años

$10-30 USD

Pagado a la entrega
Python Programming For simplicity we'll assume that the input text is in lowercase and that it does not contain any punctuation (no commas, periods, etc...) Your program will first ask the user to make a choice between encryption into the secret language (E) or decryption from the secret language (D). When the user specifies 'E' for encryption, the program will translate each word in the input text into the secret language, will put the translated words in reverse order into one translated message and will print out the translated message. The translated message will have exactly one space character between words. When the user specifies 'D' for decryption', the program will attempt to recover the original words from the input text. This is only possible if the words have a specific format: they start with a vowel and end with tan or they end with a consonant followed by est. If one or more word does not have this format, the decryption fails and the message 'Invalid Message' is printed. Testing: Make sure that you test your solution before you submit it. Here are a few test cases with the expected output. Feel free to add your own. Test case 1 - encryption is correct for words starting with a vowel Please type E to encrypt or D to decrypt a message: E Please enter your message: apple The secret message is: appletan Test case 2 - encryption is correct for words starting with a consonant (non vowel) Please type E to encrypt or D to decrypt a message: E Please enter your message: banana The secret message is: ananabest Test case 3 - encryption is correct for phrases with multiple words Please enter your message: python is fun The secret message is: unfest istan ythonpest Test case 4 - encryption is correct when words are separated by more than one space character Please enter your message: simple is better than complex The secret message is: omplexcest hantest etterbest istan implesest Test case 5 - decryption is correct for words ending with 'tan' Please type E to encrypt or D to decrypt a message: D Please enter your message: orangetan The secret message is: orange Test case 6 - decryption is correct for words ending with a consonant followed with 'est' Please type E to encrypt or D to decrypt a message: D Please enter your message: ryptographycest The secret message is: cryptography Test case 7 - decryption is correct for phrases with multiple words Please type E to encrypt or D to decrypt a message: D Please enter your message: omplexcest hantest etterbest istan implesest The secret message is: simple is better than complex Test case 8 - The user is repeatedly prompted for input until they enter a valid choice (E or D) Please type E to encrypt or D to decrypt a message: K Invalid choice Please type E to encrypt or D to decrypt a message: x Invalid choice Please type E to encrypt or D to decrypt a message: e Invalid choice Please type E to encrypt or D to decrypt a message: E Please enter your message: hello The secret message is: ellohest Test case 9 - An invalid message is not decrypted Please type E to encrypt or D to decrypt a message: D Please enter your message: this is fun Invalid Message How do I get started? Your task is to write a Python program that encrypts or decrypts a given text into/from a secret language. Individual words in the text are encrypted according to the following rules: If the word starts with a vowel append 'tan' to the word. The vowels are a, e, i, o, u. Otherwise, take the first letter of the word, move it to the end and then append 'est'. So: apple becomes appletan orange becomes orangetan banana becomes ananabest python becomes ythonpest def starts_with_vowel(word):
ID del proyecto: 16185604

Información sobre el proyecto

2 propuestas
Proyecto remoto
Activo hace 6 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
2 freelancers están ofertando un promedio de $21 USD por este trabajo
Avatar del usuario
I went through your description. Looks very interesting. I could give you the solution in no time. Also, with a well-documented code. You'll get all the rights. Let me know if you are interested in. Thank you!
$10 USD en 0 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
Los Gatos, United States
5,0
7
Forma de pago verificada
Miembro desde nov 1, 2017

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.