Make a program for a conversation of the following type:

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


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

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use 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]...

By purchasing this solution you'll be able to access the following files: and wordpairs.txt.

for this solution

or FREE if you
register a new account!

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.

Upload a file
Continue without uploading

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