1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
irina1246 [14]
3 years ago
12

In this problem, you will write a translation program. First your program will prompt the user for three filenames. The first fi

le is a dictionary. Each line contains a regular English word followed immediately by a vertical bar ($\verb#|#$) followed immediately by the word or phrase that the word should be translated to. For example, if I wanted to translate $\verb#'hello'#$ as $\verb#'hola'#$, one entry in the file would be $\verb#hello|hola#$. The second file should contain a text to translate. You may assume that words in this file are separated by spaces and that there is no other punctuation (including periods at the ends of sentences). The last filename should be for an output file.
The program will then take each word in the input file and translate it based on the dictionary. In other words, if the word appears on the left side of a bar in the dictionary file, the program will replace it with whatever is on the right side of the bar. If the word does not appear on the left side of a bar, it is kept as is in the output. (Note, though, that you do not have to preserve case in the output---if a word is capitalized in the input, it does not have to be capitalized in the output.) All the words should be written to the output file. Other than prompting for the filenames, there should be no other output to the IDLE shell.

For example, using the provided files $\verb#pirateWords.txt#$ and $\verb#myInput.txt#$, a run of your program could look like this:
Enter name of dictionary: pirateWords.txt
Enter name of text to translate: myInput.txt
Enter name of output file: myOutput.txt

There should be nothing printed, and the contents of $\verb#myOutput.txt#$ would be:
avast i have come to swipe ye filthy lucre
ye filthy lucre or ye life
Computers and Technology
1 answer:
Mrac [35]3 years ago
6 0

Answer:

Ohh...................................................

You might be interested in
You are in charge of an event at work. You want to plan and schedule events and resourse. What type of software should you use?
Sav [38]

project management... we use this software to plan and schedule event and resources.

3 0
3 years ago
Read 2 more answers
STAY AWAY FROM AND REPORT mariaivanovaloveyou!!!!!!! SHE IS A BRAINLY USER AND KEEPS POSTING INAPPROPRIATE PICTURES OF HER BODY
Bond [772]

Answer:

Yep, saw her posts. Thanks for the warning though. I reported one of her posts. It's just another example of how desperate people are and what measures they will take to get attention. She'll probably be banned soon

Explanation:

Thank you for the warning though. I hope this reaches more people.

7 0
3 years ago
6. Consider a circle of diameter d cm.
blagie [28]

Circles

Area of Circle is \pi d^{2} /4

Total percentage increase in the area of the modified circle is 69%

Explanation:

(a)  Given the diameter of the circle be d

Then the radius of the circle = r = d/2

and the area of the circle is given by:

 

Area(A) = \pi r^{2}  

A = \pi (d/2)^{2}

A = \pi d^{2} /4

The area of circle is \pi d^{2} /4

(b)

The increase in percentage while changing the dimensions is given by the formula  :

Total % increase = a% + b% - (a% * b%)/100

Where ,

a% is the percentage increase in side a

b% is the percentage increase  in side b

Let the percentage increase in radius is : a%

Since a% = b%

So the formula is

Total increase % = a% + a% + (a% * a%)/100

Given here the diameter of the circle increases by 30% so a =30

Therefore, putting the value of a in the formula

Total increase % = 30% + 30% + (30% *30%)/100

Total increase % = 60% + 9%

Total increase % =69%

Therefore the total percentage increase in the area of the modified circle is 69%

8 0
3 years ago
What is one reason to create a study check list​
grigory [225]
To make sure you studied everything you need to know.
4 0
3 years ago
Which scenario shows the best example of intrinsic motivation?
marishachu [46]

The answer is A. Zareem takes good notes in class to know the lesson better.

Explanation:

Intrinsic motivation occurs if individuals act based on inner interests or rewards such as feeling proud of one-self. This is the opposite of extrinsic motivation that involves external factors such as punishments, rewards, pressure from others, etc. According to this, the only one that is an example of intrinsic motivation is "Zareem takes good notes in class to know the lesson better" because the action (taking good notes) is triggered by Zareem's own interest in learning rather than by any external factor.

7 0
3 years ago
Read 2 more answers
Other questions:
  • The internet is an example of
    12·2 answers
  • How many mustangs are built every day
    13·2 answers
  • What is not a common purpose for a research report?
    5·2 answers
  • The command button to protect a document is part of the​.
    10·1 answer
  • Write a couple of paragraph on 'limited government and its important'?​
    7·1 answer
  • People using commercially available software are usually asked to read and agree to a(n) _____
    10·1 answer
  • Which is true about lists and stacks?
    8·1 answer
  • A _____ is a number that summarizes an encrypted information. digital certificate hash function message digest hash algorithm
    8·1 answer
  • Q: If a program is invoked with "python program.py -r input.dat output.dat", what are the elements of argv?
    10·1 answer
  • Hola, alguien aquí me podría ayudar dándome ideas a cerca de office (Word, PowerPoint o Excel) estoy desesperada no puedo pensar
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!