Question

For part 1, you will NOT be writing anything in Python. You will be describing how...

For part 1, you will NOT be writing anything in Python. You will be describing how the program will work using words and illustrations if it helps.

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.)

How would this work?

What do you need to do?

Make a written outline of how you would accomplish the task using english or flow diagrams. Do NOT use any Python instructions in your description.

Homework Answers

Answer #1

The projects has two parts one is database designing and the flow.

Instructions for the same .

1. Create a data base with these fields

  

ID Autoincrement primary key
word varchar unique
encryptedWord varchar

Second part.

1. writing a program

a. initialize a string variable.

b. prompt user for input.

c. as user hits enter, trim the input string and check the length of the string

if it is greater than 0 proceed

i. Now copy the string inot one more variable and string search(phase search) in a loop from data base such as we have stored {"id": 1, "word": "Lot's of laugh", "encrypt": "LOL"}

select * form tbl_encrypt_master

loop thrugh it.

if string matches with the word in the database

push it into another array(key as the phase and value as encripted value) and replace the matched with ""(empty string) now we have a smaller scentence,

exit

ii. Now the remainig string which did not matched with any of the string break the string with spaces and put the same into an array.

write a query for each of the word such as

select encrypt from tbl_encrypt_master where word="'+newStringVal[index]+'"

if result of it greater than zero store it into the key value array same as phase.

else also store the same into the array with empty string.

iii. now use the older string and the array where you can use find and replace of the string and phase.

else prompt for input

Know the answer?
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
Similar Questions
Use python language please #One of the early common methods for encrypting text was the #Playfair...
Use python language please #One of the early common methods for encrypting text was the #Playfair cipher. You can read more about the Playfair cipher #here: https://en.wikipedia.org/wiki/Playfair_cipher # #The Playfair cipher starts with a 5x5 matrix of letters, #such as this one: # # D A V I O # Y N E R B # C F G H K # L M P Q S # T U W X Z # #To fit the 26-letter alphabet into...
Python: Simple Banking Application Project Solution: • Input file: The program starts with reading in all...
Python: Simple Banking Application Project Solution: • Input file: The program starts with reading in all user information from a given input file. The input file contains information of a user in following order: username, first name, last name, password, account number and account balance. Information is separated with ‘|’. o username is a unique information, so no two users will have same username. Sample input file: Username eaglebank has password 123456, account number of BB12 and balance of $1000....
How much money do you think you would earn in a period of 30 days if...
How much money do you think you would earn in a period of 30 days if you were paid as follows: one cent for the first day, two cents for the second day, four cents for the third day, eight cents for the fourth day, and so on (i.e. your salary doubles each day)? Do you think you would make very little money, just a few dollars, at the end of the 30-day period? Let us write a program to...
How would I solve these python problems? A) File Display Download the file from here named...
How would I solve these python problems? A) File Display Download the file from here named numbers.txt . Write a program that displays all of the numbers in the file. numbers.txt contains 22 14 -99 AB B) Error Check Float Input When you want an int input you can check the input using the string isdigit() method. However, there is no comparable check for float. Write a program that asks the user to enter a float and uses a try-except...
Using Python, write the following code. You are to allow the user to enter the daily...
Using Python, write the following code. You are to allow the user to enter the daily temperature as a floating-point number. You should make the assumption that you are recording temperatures in Fahrenheit. You should allow the user to continue entering temperatures until the value -999 is entered. This number should not be considered a temperature, but just a flag to stop the program. As the user enters a temperature, you should display the following each time: Current Temperature: 999...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in Lab 2 to obtain a diameter value from the user and compute the volume of a sphere (we assumed that to be the shape of a balloon) in a new program, and implement the following restriction on the user’s input: the user should enter a value for the diameter which is at least 8 inches but not larger than 60 inches. Using an if-else...
MIPS ASSEMBLY Have the user input a string and then be able to make changes to...
MIPS ASSEMBLY Have the user input a string and then be able to make changes to the characters that are in the string until they are ready to stop. We will need to read in several pieces of data from the user, including a string and multiple characters. You can set a maximum size for the user string, however, the specific size of the string can change and you can’t ask them how long the string is (see the sample...
Use Python 3.8: Problem Description Many recipes tend to be rather small, producing the fewest number...
Use Python 3.8: Problem Description Many recipes tend to be rather small, producing the fewest number of servings that are really possible with the included ingredients. Sometimes one will want to be able to scale those recipes upwards for serving larger groups. This program's task is to determine how much of each ingredient in a recipe will be required for a target party size. The first inputs to the program will be the recipe itself. Here is an example recipe...
USING PYTHON do all the he problems using while loop , continue and break 1-This problem...
USING PYTHON do all the he problems using while loop , continue and break 1-This problem provides practice using a while True loop.write a function named twoWords that gets and returns two words from a user. The first word is of a specified length, and the second word begins with a specified letter.The function twoWords takes two parameters: an integer, length, that is the length of the first word and a character, firstLetter, that is the first letter of the...
Write a program in python reverse each and every word of the sentence using function taking...
Write a program in python reverse each and every word of the sentence using function taking string as input parameter from user and passing that string into function and also explain the logic ======================================= input: 'Exam is gonna be good' output: 'maxE si annog eb doog' ================ i am trying like this but getting confused '.'join([w::-1] for w in s.split()]) i need more focus on explanations because it is making me confuse i am not clear with concepts so please...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • explain the difference between intentional interference with contractual relationship and interference with prospective advantage ?? Give...
    asked 5 minutes ago
  • How does James Madison advocate for protections and safeguards for the rights and liberties of the...
    asked 7 minutes ago
  • The concentration of a drug in body fluids depends on the time (t) elapsed after its...
    asked 18 minutes ago
  • Between: Galton and General Intelligence, Thurstone’s The Theory of Multiple Factors, Guilford’s ‘Structure of Intellect’, Cattell’s...
    asked 21 minutes ago
  • 7.4 What is your recommendation for the maximum size of coarse aggregate for the following situation?...
    asked 33 minutes ago
  • In order to perform a Fast Fourier Transform (FFT), what restrictions are placed on the length...
    asked 36 minutes ago
  • A doctor wants to estimate the mean HDL cholesterol of all​ 20- to​ 29-year-old females. How...
    asked 36 minutes ago
  • A 740 ft. long vertical curve is needed for a section of highway with an approaching...
    asked 1 hour ago
  • SOMEONE, PLEASE ANSWER This is for Numerical Methods class homework Consider the function ex + x...
    asked 1 hour ago
  • Consider a first-order reaction, requiring 50% reaction in the concentration. Would a plug-flow or a CMFR...
    asked 1 hour ago
  • According to the video, what proportion of college and university faculty currently are “adjuncts”? A. 80%...
    asked 1 hour ago
  • [5 pts] An element with no closing tag is called which of the following? an attribute...
    asked 2 hours ago