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
olga nikolaevna [1]
3 years ago
10

Your task is to implement a function replace_once(t, d), that takes a text t and a replacement dictionary d, and returns the res

ult of replacing words according to the dictionary: if a word appears as a key, replace it with the dictionary value, and if a word does not appear in the dictionary, leave it alone.
Given a list of words, you can concatenate them together with spaces in between as follows:
word_list = "I love eating bananas".split()
print("Word list:", word_list)
back_together = " ".join(word_list)
print("Back together:", back_together)
# You can also join them in other ways, btw. Just DON'T do it for this homework.
print("You can also put commas:", ", ".join(word_list))
Computers and Technology
1 answer:
djverab [1.8K]3 years ago
4 0

Answer:

Explanation:

The following code is written in Python and does exactly as requested. It is a function named replace_one(t, d) that takes the two parameters one text/word and one dictionary. If the word is found as a key in the dictionary it places the value in a variable called new_word and returns it to the user, if it is not found then the function returns nothing.

def replace_once(t, d):

   if t in d:

       new_word = d.get(t)

       return new_word

   return

You might be interested in
Keyshia adds an image of a triple beam balance and a
vredina [299]

Answer:

select all images

Go to the pictures tool format tab

Choose the arrange group

Choose the group Option

Explanation:

7 0
3 years ago
The page-replacement policy means that pages are not placed to make more space. A. True B. False
BabaBlast [244]

Answer:

B. False

Explanation:

A page-replacement policy can be defined as a set of algorithm that instructs the operating systems on what memory page is to be swapped, paged out or written to disk in order to allocate more memory as they're required by various active processes during virtual memory management.

Some of the algorithms or techniques used by the operating system for page-replacement policy are;

1. Last In First Out (LIFO).

2. First In First Out (FIFO).

3. Least Recently Used (LRU).

4. Least Frequently Used (LFU).

5. Optimal (OPT or MIN).

Hence, the page-replacement policy means that pages are placed to make more space and to minimize the total number of page that would be missing.

7 0
3 years ago
Two key components of corporate profitability are _________ and _________.
Maru [420]
I would say that the key components of corporate profitability are firstly to have a solid structure and system which allows the company to be efficient, productive and predictable. the second component should be financial literacy which means that the owner or boss must be aware of the financial situation of the company in order to make good decisions for the business. 
7 0
3 years ago
Help please and thank you :)
Fynjy0 [20]
Answer:First one net is the answer ........
5 0
3 years ago
An examination of how well a particular solution is supportable given the organization’s current technological infrastructure an
san4es73 [151]

Answer:

Technical Feasibility is the correct answer of this question.

Explanation:

Examining how well a specific approach can be supported given the current technological infrastructure and resources of the company, including hardware, software, networking and personnel, is known as technical feasibility.

A technological feasibility report explores the specifics of how you plan to supply a goods or services to clients.It the strategic or operational strategy of where the company manufactures, sells, supplies and monitors its goods or services.

6 0
3 years ago
Other questions:
  • File formats are linked to certain programs.<br><br> True<br> False
    12·2 answers
  • Emily wants to search online for cakes containing nuts. However, she wants to skip cakes that have raisins in them. Which option
    9·1 answer
  • How is multiprogramming implemented using virtual memory?
    10·1 answer
  • You may see the term FAQ on websites which stands for Frequently Asked Questions this is an example of which type of mnemonic?
    9·1 answer
  • Mai has recently created her own e-mail account. Her father gave her permission to e-mail her friends and family but warned her
    11·2 answers
  • Which type of computer network ensures high security
    10·1 answer
  • Help pls. Computer basics.
    5·2 answers
  • What is role can ICT play in helping school take part in social responsibility
    14·1 answer
  • You cannot then move and resize the control on the form as desired with your mouse TRUE OR FALSE​
    6·2 answers
  • Could some please answer the question in the pictures? Thank you!! I will also give your brainliest if you give me the right ans
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!