Question

1. Write a python code: Using a dictionary, make a text encrypter/decrypter. In decrypt mode, if...

1. Write a python code:

Using a dictionary, make a text encrypter/decrypter.

In decrypt mode, if the user inputs “Y r u l8?”, the program should output “Why are you late?”, for example.

In encrypt mode, if the user inputs “See you later”, it should output “c u l8r”.

Obviously you can’t handle every possible phrase, but add as many as you can. Don’t bother with multiword shortcuts for now (LOL, BRB, etc.)

2. Draw a flowchart of your encryption/decryption program.

Please use simple functions, I'm a beginner user.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

please see the screenshot of source code and the output:

  • a dictionary contains some shortcuts
  • A user is asked to input a text
  • the appropriate translation is displayed from the dictionary

# create a dictionary translations translations = {Y r u 18: Why are you late, c u 18r: see you later, lol laugh ou

output:

Please type your input : Y r u 18 Y r u 18-Why are you late

Add a comment
Know the answer?
Add Answer to:
1. Write a python code: Using a dictionary, make a text encrypter/decrypter. In decrypt mode, if...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need Help to Write a function in C that will Decrypt at least one word with a substitution cipher given cipher text an...

    I need Help to Write a function in C that will Decrypt at least one word with a substitution cipher given cipher text and key My Current Code is: void SubDecrypt(char *message, char *encryptKey) { int iteration; int iteration_Num_Two = 0; int letter; printf("Enter Encryption Key: \n");                                                           //Display the message to enter encryption key scanf("%s", encryptKey);                                                                   //Input the Encryption key for (iteration = 0; message[iteration] != '0'; iteration++)                               //loop will continue till message reaches to end { letter = message[iteration];                                                      ...

  • Write a Python program which implements the following two classical cryptosystem which we covered n class:...

    Write a Python program which implements the following two classical cryptosystem which we covered n class: a) Affine Cipher b) Vigenere Cipher Your program should consist of at least five functions: a) Two functions named encrypt, one for each of the two algorithms which accepts a lowercase alphabetical plaintext string and key as input and outputs a corresponding cipher text string. b) Two functions named decrypt, one for each of the two algorithms which accepts a lowercase alphabetical ciphertext string...

  • Write a javascript program which implements the following two classical cryptosystem which we covered in class:...

    Write a javascript program which implements the following two classical cryptosystem which we covered in class: Affine Cipher Vigenere Cipher Your program should consist of at least five functions: Two functions named encrypt, one for each of the two algorithms which accepts a lowercase alphabetical plaintext string and key as input and outputs a corresponding cipher text string. Two functions named decrypt, one for each of the two algorithms which accepts a lowercase alphabetical ciphertext string and a key as...

  • Implement in Go language AES encryption mode CBC with providing the packages name for Go language....

    Implement in Go language AES encryption mode CBC with providing the packages name for Go language. You can implement AES-ECB Mode (the basic AES) from crypto/aes package and crypto/cipher.Block. You can also get the SHA-256 hash function from crypto/sha256. You can get the secure random numbers generator from crypto/rand package. However, the you will implement both CBC mode and HMAC from scratch. You are NOT allowed to use any libraries or packages to implement these two things for you. You...

  • Part 1 – Data Encryption Data Encryption is the process of transforming data, using a cipher,...

    Part 1 – Data Encryption Data Encryption is the process of transforming data, using a cipher, to make it unreadable to anyone except those possessing special knowledge. In this problem you will implement a simple encryption technique on data that comprises of non-negative integers that have at least six digits with no leading zeroes. In order to encrypt the number the following functions are to be implemented: void input(int *num); int add4(int num); int shift(int num); void printOutput(int encryptNum, int...

  • Develop a Java application that uses a type of encrypted alphabet, called a random monoalphabetic cipher,...

    Develop a Java application that uses a type of encrypted alphabet, called a random monoalphabetic cipher, to encrypt and decrypt a message. Your encryption key and message are to be read in from two different files and then the encrypted message will be output to third file. Then the encrypted message is read in and decrypted to a fourth file. A monoalphabetic cipher starts with an encryption word, removes the redundant letters from the word, and assigns what’s left to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT