Write a program that replaces words in a sentence. The input begins with word replacement pairs (original and replacement). The next line of input is the sentence where any word on the original list is replaced. Ex: If the input is: automobile car manufacturer maker children kids The automobile manufacturer recommends car seats for children if the automobile doesn't already have one.

Answers

Answer 1

Answer:

In Python:

toreplace = input("Word and replacement: ")

sentence = input("Sentence: ")

wordsplit = toreplace.split(" ")

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

   sentence = sentence.replace(wordsplit[i], wordsplit[i+1])

print(sentence)

Explanation:

This gets each word and replacement from the user

toreplace = input("Word and replacement: ")

This gets the sentence from the user

sentence = input("Sentence: ")

This splits the word and replacement using split()

wordsplit = toreplace.split(" ")

This iterates through the split words

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

Each word is then replaced by its replacement in the sentence

   sentence = sentence.replace(wordsplit[i], wordsplit[i+1])

This prints the new sentence

print(sentence)


Related Questions

wassup anybody tryna play 2k

Answers

Answer:

u dont want the smoke my boy u dont

Explanation:

Answer:

I only play 24k B)))))))))

12. But not parallelism, it is achievable to have concurrency in operating system threading?

Answers

Answer:

Yes, it is possible to have concurrency but not parallelism. Concurrency: Concurrency means where two different tasks or threads start working together in an overlapped time period, however, it does not mean they run at same instant.

While all pages use HTML code, not all pages are written in

Answers

Is this a question?

*Answer: not much information to answer with*

Answer:

Code Form

Explanation:

Write a template that accepts an argument and returns its absolute value. The absolute entered by the user, then return the total. The argument sent into the function should be the number of values the function is to read. Test the template in a simple driver program that sends values of various types as arguments and displays the results.

Answers

Answer:

In python:

The template/function is as follows:

def absval(value):

   return abs(value)

Explanation:

This defines the function

def absval(value):

This returns the absolute value of the argument using the abs() function

   return abs(value)

To call the function from main, you may use:

print(absval(-4))

Which factor distinguishes IOT devices from standard computing devices such as laptops and smart phones?

Answers

Answer:

PLS help me I'm tried

Haa plsssssss

What are
the rules for giving
variable name ?​

Answers

Answer:

Rules for naming variables:

- Variable names in Visual C++ can range from 1 to 255 characters. To make variable names portable to other environments stay within a 1 to 31 character range.

- All variable names must begin with a letter of the alphabet or an underscore ( _ ).  For beginning programmers, it may be easier to begin all variable names with a letter of the alphabet.

- After the first initial letter, variable names can also contain letters and numbers.  No spaces or special characters, however, are allowed.

- Uppercase characters are distinct from lowercase characters.  Using all uppercase letters is used primarily to identify constant variables.  

- You cannot use a C++ keyword (reserved word) as a variable name.

Joseph wants to take out the color of the background wall from an image what can Joseph do to achieve this​

Answers

Answer:

Go to remove a background website

Explanation:

He can download an application IbisPaint X, use the magic wand tool and select the background and then press the outlined square and select the option clear layer

6
Suppose the following formula is inputted into Excel:
=MROUND(1/4,100)
The output in the cell will be:
0
0.25
0.2500
1

Answers

Answer:

the output in the cell will be 0,2500

A new office need 16 computer Tables.If a computer tables costs 2,671.How much is needed to purchase 16 computer tables.​

Answers

Answer:

The total amount needed to purchase the 16 computer tables is 42,736

Explanation:

Given;

Total number of computer tables needed in the new office, n = 16

cost of one computer table, c = 2,671

The total amount needed to purchase the 16 computer tables is calculated as follows;

Total cost of 16 computer tables = cost of one computer table x total number of tables needed

Total cost of 16 computer tables = 2,671 x 16

Total cost of 16 computer tables = 42,736

Therefore, the total amount needed to purchase the 16 computer tables is 42,736

A user has a computer with a single SSD, and the entire drive contains one partition. The user wants to install a second OS on the computer without having to reinstall the current OS. The user wants to be able to select which OS to use when booting the computer. Which Disk Management tools should the user utilize to accomplish this task?

Answers

Answer:

The correct approach is "Shrink partition". A further explanation is given below.

Explanation:

Shrinking partition shrinks or decreases this same disc size as well as unallotted disc space, unallotted space could be utilized to mount a secondary Operating system to operate as a double operating system.Whilst also diminishing everything into neighboring volatile memory on another disc, this same space required for area as well as drives could also be reduced.

Thus the above is the correct answer.


Open Office software is an example of what software

Answers

Answer:

Application software

Explanation:

OpenOffice.org (OOo), commonly known as OpenOffice, is a discontinued open-source office suite. ... OpenOffice included a word processor (Writer), a spreadsheet (Calc), a presentation application (Impress), a drawing application (Draw), a formula editor (Math), and a database management application (Base).

Explain what an IM is,

Answers

Answer: Stands for "Instant Message." Instant messaging, or "IMing," as frequent users call it, has become a popular way to communicate over the Internet

Explanation:

What are the vertical areas of the spreadsheet?

a
Verticies
b
Ventricals
c
Columns
d
Rows

Answers

Answer:

Columns

Explanation:

A spreadsheet may a explained as a tabular arrangement or arrays of cells which allows users to enter both numeric and string data for storage, manipulation and analysis. The spreadsheet program has both the vertical and horizontal cell arrangement with the vertical areas being reffered to as THE COLUMN which are labeled using alphabets arranged from A - AZ, AA - AZ, and so on to make up a total of 16384 columns on the Microsoft Excel spreadsheet program. Cells are located using a combination of column and row address. With row representing the horizontal area of the spreadsheet and labeled with digits. Therefore cells are usually refereed to as A1, (column A row 1) and so on.

how does such editing affect courtrooms where visual evidence is often presented?​

Answers

Can hurt others..!! yw

Write a program that asks the user to enter an international dialing code and then looks it up in the country_codes array (see Sec 16.3 in C textbook). If it finds the code, the program should display the name of the corresponding country; if not, the program should print an error message. For demonstration purposes have at least 20 countries in your list.

Answers

Answer:

Explanation:

The following code is written in Python, it prompts the user for a country code, look it up and if found prints out the corresponding country name. If not it prints out an error message stating "Code not found"

country_codes = {"Argentina": 54, "Bangladesh": 880,

        "Brazil": 55, "Burma (Myanmar)": 95,

        "China": 86, "Colombia": 57,

        "Congo: Dem. Rep. of": 243, "Egypt": 20,

        "Ethiopia": 251, "France": 33,

        "Germany": 49, "India": 91,

        "Indonesia": 62, "Iran": 98,

        "Italy": 39, "Japan": 81,

        "Mexico": 52, "Nigeria": 234,

        "Pakistan": 92, "Philippines": 63,

        "Poland": 48, "Russia": 7,

        "South Africa": 27, "South Korea": 82,

        "Spain": 34, "Sudan": 249,

        "Thailand": 66, "Turkey": 90,

        "Ukraine": 380, "United Kingdom": 44,

        "United States": 1, "Vietnam": 84}

user_code = int(input("Enter Country code: "))

keys = list(country_codes.keys())

vals = list(country_codes.values())

if user_code in vals:

   print(keys[vals.index(user_code)])

else:

   print("Code not found")

find four
reasons
Why must shutdown the system following the normal sequence

Answers

If you have a problem with a server and you want to bring the system down so that you could then reseat the card before restarting it, you can use this command, it will shut down the system in an orderly manner.

"init 0" command completely shuts down the system in an order manner

init is the first process to start when a computer boots up and keep running until the system ends. It is the root of all other processes.

İnit command is used in different runlevels, which extend from 0 through 6. "init 0" is used to halt the system, basically init 0

shuts down the system before safely turning power off.

stops system services and daemons.

terminates all running processes.

Unmounts all file systems.

Learn more about  server on:

https://brainly.com/question/29888289

#SPJ1

Explain the term software dependability. Give at least two real-world examples which further elaborates
on this term. Do you think that we can ignore software from our lives and remain excel in the modern
era? What is the role of software in the current pandemic period?

Answers

Answer:

Explanation:In software engineering, dependability is the ability to provide services that can defensibly be trusted within a time-period. This may also encompass mechanisms designed to increase and maintain the dependability of a system or software.Computer software is typically classified into two major types of programs: system software and application software.

my code get an input of 1900 and it should output not a leap year but it fails first line of code. It should output not a Leap any number with 1500 not divisble by 4 with/out a remainder should output (not a leap year. )


input_year = int(input())

if input_year % 4 == 0: #fails on this step, 1900 should be false
print(input_year, "- is Leap Year")

elif input_year % 100 == 0:
print(input_year, "- leap year")

elif input_year % 400 ==0:
print(input_year, "is a leap year")

else:
print(input_year, "- not a leap year")

Answers

Answer:

Explanation:

The code does not fail on the first step since 1900 divided by 4 is actually 475 and has no remainder, meaning that it should return True. The code won't work because the if statements need to be nested in a different format. The correct algorithm would be the following, which can also be seen in the picture attached below that if we input 1900 it would output is not a leap year as it fails on the division by 400 which gives a remainder of 0.75

input_year = int(input())

if input_year % 4 == 0:

   if input_year % 100 == 0:

       if input_year % 400 == 0:

           print(input_year, "is a leap year")

       else:

           print(input_year, "- not a leap year")

   else:

       print(input_year, "is a leap year")

else:

   print(input_year, "- not a leap year")

how do i remove my search history?

Answers

Step 1: Go to PC settings from the Start Menu or Desktop. Step 2: In PC settings, choose Search in the menu, and click Delete history.

Number the steps to describe how Tristan can complete
this task.
Cut the Television and related equipment row.
Paste the Television and related equipment row.
Click the plus sign on the left side of the table between
the last two rows.

Answers

Answer:

Cut the Television and related equipment row.Click the plus sign on the left side of the table between  the last two rows.Paste the Television and related equipment row.

Explanation:

In order to move the row, Tristan should first select the row and then cut it. This will ensure that the row will be moved completely instead of copied.

Tristan should then hover with the mouse between the last two rows and click on the plus sign on the left side. It will add a new row to the sheet. between the last two rows.

Tristan should then select the topmost cell and click paste. The television row will be pasted there and Tristan would have successfully moved it.

Answer:

2 3 1 Your Welcome

Explanation:

State the causes of the increase in carbondioxide
concerntration​

Answers

Answer:

The right response is "fossil fuels".

Explanation:

Fossil fuels such as coal as well as oil conduct electricity that has already been photosynthesized by vegetation or plant species from the ecosystem for thousands of generations.Within only several hundred years we've returned fuel to that same ecosystem or environment, the sources of CO₂ rise are fossil fuels.

However, the above solution is the right one.

This unit is used to print the picture on a paper

Answers

Answer:a printer

Explanation:

It prints things

briefly explain 5 software which is either free or fee​

Answers

Answer:

65

Explanation:

Answer:

65

Explanation:

What is the name for the part of a camera which can block light when it's closed, and let light in when it's open?


Pixel


Lens


Focus


Shutter

Answers

dnt listen to the link stuff

Programming a computer to win at chess
has been discussed since the
A. 1940's
B. 1950's
C. 1960's

Answers

I believe it was the 1960s but u should seach it up to double check

Answer:

B.

Explanation:

When someone refers to "space" on a computer or device, they are usually referring to _____, which allows the user to save a file for future use, even after the computer has been turned off. secondary storage the central processing unit (CPU) software primary memory

Answers

Answer:

it could either be the R.A.M or the hard drive

Explanation:

Answer:

Secondary Storage

Explanation:

Secondary storage is permanent, therefore, it fits the context of what the question is asking for.

Suppose Alice downloads a buggy browser that implements TLS incorrectly. The TLS specification says that, during the handshake, the browser should send a random 256-bit number RB. Instead of picking RB randomly the browser always sends all zeros. Describe an attack that is possible against this buggy browser and how to update the browser so that this attack is no longer feasible.

Answers

Solution :

It is given that Alice downloads the buggy browser which implements a TLS incorrectly. The specification of a TLS states that during a handshake, the browser sends a 256 bit number of RB randomly.

So in this case, a man-n-the-middle attack is possible. It can compromise the confidentiality of Alice. Updating the browser by visiting the website and checking its latest version of the browser or installing some other browser which has a more trust in the market for its security features.

Three reasons Why we connect speakers to computers

Answers

1. Some computers do not have speaker therefore we connect speakers

2. Some speakers don’t have clear audio so to fix that we connect new ones

3. What do you do if your speaker inside the computer is broken..... connect new speakers

Answer:

we connected speakers with computers for listening voices or sound .. because the computer has not their own speaker..

Explanation:

Write a function, AvgList, that takes a single argument, a list, and returns the average (mean) of the numbers in the list. You may assume that all elements of the list are numeric (int or float), and that the list has at least one element. Hints: Use the function SumList that you wrote above. Use the built-in function len to get the number of elements in the list.

Answers

Answer:

Answered below

Explanation:

//Programmed in Java

public double avgList(int [] nums){

int I;

double sumOfNumbers = 0;

double averageOfNumbers = 0;

//Loop over to sum all elements in the list.

for(I = 0; I < nums.length; I++){

sumOfNumbers += nums[I];

}

//Calculate the average

averageOfNumbers = sumOfNumbers/ nums.length;

return averageOfNumbers;

}

Which step should you follow to copy a worksheet after clicking Format in the Cells group?
O Under Arrange Sheets, click Cut or Copy Sheet.
O Under Organize Sheets, click Move or Copy Sheet.
O Under Arrange Sheets, click Select and Move Sheet.
O Under Organize Sheets, click Arrange and Copy Sheet.

Answers

Answer:

Under Organize Sheets, click Move or Copy Sheet should you follow to copy a worksheet after clicking Format in the Cells group.

Explanation:

Other Questions
Giving away 30 points, have a good day PLSS HELP IMMEDIATELY!!! ill give brainiest if u dont leave a link! A dentist uses a concave mirror to examine a tooth that is 1.00cm in front of the mirror. The image of the tooth forms 10.0 cmbehind the mirror. What is the mirror's radius of curvature? Harper Engine Company needs $611,000 to take a cash discount of 2.50/10, net 75. A banker will loan the money for 65 days at an interest cost of $16,200. a. What is the effective rate on the bank loan? (Use a 360-day year. Do not round intermediate calculations. Input your answer as a percent rounded to 2 decimal places.) Effective rate of interest % b. How much would it cost (in percentage terms) if Harper did not take the cash discount but paid the bill in 75 days instead of 10 days? (Use a 360-day year. Do not round intermediate calculations. Input your answer as a percent rounded to 2 decimal places.) Cost of not taking a cash discount % c. Should Harper borrow the money to take the discount? Yes No d. If another banker requires a 10 percent compensating balance, how much must Harper borrow to end up with $611,000? (Round your answer to 2 decimal places.) Amount to be borrowed e-1. What would be the effective interest rate in part d'if the interest charge for 65 days were $10,600? (Use a 360-day year. Do not round intermediate calculations. Input your answer as a percent rounded to 2 decimal places.) Effective rate of interest %e-2. Should Harper borrow with the 10 percent compensating balance requirement? (There are no funds to count against the compensating balance requirement.) Yes No If a random variable has binomial distribution with n = 150 and p = 0.6. Using normal approximation the probability; P(X 95) =--- How do you pronounce Aevico?A. Ay-Vak-OhB. Ah-Vi-SoC. Ay-Vick-OhD. Ah-Vic-OhGotem HELP PLS ITS ALMOST DUE PLS PLS PLS 6. Markets with elastic supply and demand curves: a) Have demand and supply curves that never intersect. B) Are very sensitive to a change in price. C) Have greater movements in quantity than prices. D) Are very sensitive to a change in quantity. E) Are only theoretical and do not exist in the real world. Problem 7-2 Cost-benefit analysis of cash management (L07-2] Neon Light Company of Kansas City ships lamps and lighting appliances throughout the country. Ms. Neon has determined that through the establishment of local collection centers around the country, she can speed up the collection of payments by two days. Furthermore, the cash management department of her bank has indicated to her that she can defer her payments on her accounts y one-half day without affecting suppliers. The bank has a remote disbursement center in Florida. points a. If Neon Light Company has $2.80 million per day in collections and $1.16 million per day in disbursements, how many dollars will the cash management system free up? (Enter your answer in dollars not in millions (e.g., $1,234,567).)b. If Neon Light Company can earn 7 percent per annum on freed-up funds, how much will the income be? (Enter your answer in dollars not in millions (e.g., $1,234,567).) Interest on freed-up cash c. If the total cost of the new system is $455,000, should it be implemented? O No Yes The diagram shows part of an aquatic food webfor a stable lake ecosystem in Connecticut.TurtlesLarge fishSmall fishAquatic insectsTadpolesWater fleasRotifersAlgaeWhat is the source of energy for the algae?A wavesB. sunlightC. bacteriaD. rotifers, water fleas and tadpoles High financial leverage has the effect of: Group of answer choices Reducing both the firm's risk and its potential profits. Only increasing the firm's potential profits. Increasing both the firm's risk and its potential profits. None of these answers is correct. Only increasing the firm's risk. In the Deloitte and Touche five step process to embed ethics and values within the culture of a a firm, the _______ is the stage that gaps and ambiguities are removed1. Review and revise phase2. Development of an ongoing self-assessment of the compliance program3. Review of current ethical policies and procedures4. Risk/cultural assessment Celia made 3 1/2 cups of rice. a serving is 2/3 cupHow many servings of rice did Celia make Read this excerpt from "A Servant to Servants" and answer the question.There's nothing but a voice-like left insideThat seems to tell me how I ought to feel,And would feel if I wasn't all gone wrong.You take the lake. I look and look at it.I see it's a fair, pretty sheet of water.I stand and make myself repeat out loudThe advantages it has, so long and narrow,Like a deep piece of some old running riverCut short off at both ends.Based on the narrator's emotional state, what is most likely the meaning of sheet?O a thin surface layera flat, open expanseO an insulating coverO a blank rectangular area fill in the blank. it can be useful to have a mentor because they will help you _____ comfortable in a better longer customers Problem 4-26 (LO. 3) Imani and Doug were divorced on December 31, 2021, after 10 years of marriage. The couple's income received before the divorce included: Doug's salary $41,000 Imani's salary 55,00 The perimeter of a square (perimeter = 4 times one side) is less than 16 inches. One side of the square measures x. what are the viable solutions for the value of x? FILL THE BLANK. "Please help, I will rate!! Thank you so much!1Outsourcing is often a good choice when a product is in themature phase of the product life cycle. This statement is____________.The process of under" Early spanish colonization of north america was tied to efforts at religious conversion.a. trueb. false Silvia randomly picked 12 flowers from a garden. Three of the flowers she picked were roses. What is the experimental probability that the next flower she picks will be a rose? ________