QuestionQuestion

Make a program for a conversation of the following type:

Hi, my name is Snacke! What's your name?

Sofia

Nice to meet you, Sofia! What are you having problems with?

I eat too much English chocolate!

Oh, Sofia, you eat too much English chocolate. Whatever?

I'm getting fat.

Oh, Sofia, you're getting too fat. Whatever?

Then my pants will get crowded.

Jassa Sofia, your pants will be too tight. Whatever?

I do not want to feel fat, cardboard skull!

Jassau, Sofia, you do not want to feel thick, cardboard skull. Whatever?

Do you have difficulty taking or?

Jassa, Sofia, do you have trouble taking or? Whatever?

The program should be able to recognize the words I, you, my, your, me, dough, me, you Etc and appropriately replace them.

To make it easy to expand the number of words like

The program should recognize and replace, you should write down the words and their replacement words on one file.

It may look like this:

me you
my / your
me you

Note that the program should not search only on the first of the two words, but also the other. You should not write the file as follows:

me you
you I
my / your
your mine

To reduce the number of readings of the file, load the word pairs into a data structure.

The program ends with the user giving a RETURN character instead of a text line.

The program should add the selected word to the words in the dictionary.

Found an identical Words, we replace it with the other word in the word pair.

After completion of the session, the word is written On the screen (in the computer's answer).

Intend to make the judgment without mind to big or small Characters.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

import string

# Import word pairs from file wordpairs.txt
wordPairs = {}
for line in open("wordpairs.txt"):
    wordPairs[line.split()[0]] = line.split()[1]...
$45.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats