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
Aliun [14]
3 years ago
15

Write a program that replaces words in a sentence. The input begins with an integer indicating the number of word replacement pa

irs (original and replacement) that follow. The next line of input begins with an integer indicating the number of words in the sentence that follows. Any word on the original list is replaced. Assume that the list will always contain less than 20 word replacement pairs. Ex: If the input is:
Computers and Technology
1 answer:
Paraphin [41]3 years ago
8 0

Answer:

try this

Explanation:

if name == '__main__':

words = input().split()

data = input()

for i in range(0, len(words), 2):

if words[i] in data:

data = data.replace(words[i], words[i + 1])

print(data)

You might be interested in
What are the 2 levels of formatting in a word document
goldfiish [28.3K]

Answer:

Paragraph Styles and character formatting (font, color, etc.)

7 0
2 years ago
John is a mechanical engineer. His first task at his job is to build any microphone of his choice. He chooses to build a dynamic
Jobisdone [24]

Answer:

A. simple to construct and easy to repair

Explanation:

A dynamic microphone works on the principle of electromagnetic principle. A diaphragm is attached to a coil of wire which helps in producing sound. Responding to the sound waves, the coil of the wire is vibrated by the diaphragm.  A magnetic field is created by the magnet which is present inside the coil of wire. The electrical signal is generated in response to the motion of the coil. The speed of the motion produces the amount of the current.

Since the construction of a dynamic microphone is easier as compared to any other microphone, John is likely to opt to build one.

7 0
3 years ago
Remember that kid who would always ask you for your food, even though he packed his own lunch.
Verizon [17]

Answer:

ye ye

Explanation:

7 0
3 years ago
Read 2 more answers
Ruben is helping his team choose a leader. Of the people Ruben is considering, which one has qualities most related to being an
siniylev [52]

An effective team leader shows great skills in every area, shows great support and respect to his teammates and is very easy to get along with.

5 0
3 years ago
Read 2 more answers
 In which part of a professional email should you try to be brief, but highly descriptive? 
quester [9]
The subject line should be a brief message explaining some of the contents of the email.
4 0
3 years ago
Other questions:
  • Ted is a fashion designer. Where is he most likely to work
    9·1 answer
  • To gain one pound of fat, how many extra calories would you need to consume?
    12·1 answer
  • Evidence that Social media hasn’t improved human communication.
    12·1 answer
  • Define a function group-by-nondecreasing, which takes in a stream of numbers and outputs a stream of lists, which overall has th
    12·1 answer
  • Q1: what is significant about the contents of the destination address field?
    12·2 answers
  • GPS data can be used to track the rate and direction of plate movement. If a GPS unit measures a latitude velocity of 28.2 mm/yr
    8·1 answer
  • What console can be used to enable disable start or stop a service
    6·1 answer
  • Who plays xbox one offline and knows some multiplayer games that can be played offline.
    15·2 answers
  • What can hack or code can I use to get a shadow or frost dragon in adopt me
    6·2 answers
  • Five varieties of software​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!