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
Simora [160]
3 years ago
15

In this exercise, you will be given a phrase that includes the word “meat”. Replace that word with the word “fruit” and return t

he results.
For example:

replaceMeat("I love meat") --> "I love fruit"
replaceMeat("I bought meat at the store") --> "I bought fruit at the store"

This is in Java.

Computers and Technology
1 answer:
Aleks [24]3 years ago
8 0

Answer:

Answer is in the provided screenshot!

Explanation:

This answer is actually a simplified version of another question I've answered for you here: brainly.com/question/15538849

If you need any more explanation on how this algorithm works, please ask me!

You might be interested in
What is the creative nature of a computer<br> Help
Rus_ich [418]
The answer would be it’s Creativity
6 0
3 years ago
Read 2 more answers
An inventory management system that goes beyond just managing inventory to act as a complete distribution system (including inve
german

The answer to this question is a Warehouse Management System.

<span>Warehouse Management System or WMS is a system that is used in a warehouse to help track inventories of stocks, number of orders, warehouse locations, transportation of goods, etc. Warehouse Management System is an application that helps the users to manage the day to day operations of a warehouse thru planning, organizing, directing, and controlling the activities of the warehouse.</span>

6 0
4 years ago
Write a program that creates a dictionary containing the U.S. states as keys and their capitals as values. (Use the Internet to
Dima020 [189]

Answer:

  1. import random  
  2. states = {
  3.    "Alabama": "Montgomery",
  4.    "California": "Sacramento",
  5.    "Florida": "Tallahassee",
  6.    "Hawaii": "Honolulu",
  7.    "Indiana": "Indianapolis",
  8.    "Michigan": "Lansing",
  9.    "New York": "Albany",
  10.    "Texas" : "Austin",
  11.    "Utah" : "Salt Lake City",
  12.    "Wisconsin": "Madison"
  13. }
  14. correct = 0
  15. wrong = 0
  16. round = 1
  17. while(round <= 5):
  18.    current_state = random.choice(list(states))
  19.    answer = input("What is the capital of " + current_state + ": ")
  20.    
  21.    if(answer == states[current_state]):
  22.        correct += 1
  23.    else:
  24.        wrong += 1
  25.    
  26.    round += 1
  27. print("Correct answer: " + str(correct))
  28. print("Wrong answer: " + str(wrong))

Explanation:

The solution code is written in Python 3.

Line 3 -14

Create a dictionary of US States with capital as each of their corresponding value. Please note only ten sample states are chosen here.

Line 16 - 18

Create variables to track the number of correct and inaccurate response and also round counter.

Line 19 - 28

Set the while condition to enable user to play the quiz for five questions and use random.choice to randomly pick a state from the dictionary and prompt user to input the capital of selected stated.

If the answer matched with the capital value of the selected state, increment the correct counter by one. Otherwise the wrong counter will be incremented by one. Increment the round counter by one before proceed to next round.

Line 30 - 31

Print the number of correct responses and wrong responses.

7 0
3 years ago
Write a c++ function, largestnum, that takes as parameters a double array and its size and returns the index of the last occurre
miv72 [106K]
Not a Question so how am i supposed to help with this problem
6 0
3 years ago
In the 2000s, Venezuelan President Hugo Chàvez instituted economic policies that caused smuggling and hoarding of food. What did
icang [17]
Chavez set a price ceiling on food. This is represented by the letter C - A price ceiling is a control or limit imposed by a government over how high a price can be charged for a product. By doing this, Hugo Chavez made a huge blunder, since it resulted in the quantity of food demanded exceeding the quantity supplied. This in turn resulted in people smuggling and hoarding food.
7 0
4 years ago
Other questions:
  • What device can boost an analog signal? a digital signal?
    12·1 answer
  • Plssss helpppp!!<br><br>Thanks
    11·2 answers
  • A problem associated with old drivers is:
    8·1 answer
  • The best way to insert an existing Excel chart into a document is to
    8·1 answer
  • 4) Which is a more efficient way to determine the optimal number of multiplications in a matrix-chain multiplication problem: en
    15·1 answer
  • 18. Hard skills can be used on almost any job. (3 points)<br> A. True<br> B. False
    13·2 answers
  • C programming question
    6·1 answer
  • Pls help me!! I will give 35 points and mark brainliest !!!
    10·1 answer
  • Help<br> pls need quickly
    9·1 answer
  • There are a wide variety of nonsampling errors that can occur during data collection including the first type, ________.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!