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
rosijanka [135]
3 years ago
9

There are a few errors in the code provided in the Code Editor. Your task is to debug the code so that it outputs the verses cor

rectly.
animal = input("Enter an animal: ")
sound = input ("Enter a sound: ")

e = "E"

print ("Old Macdonald had a farm, " + e)
print ("And on his farm he had a" + animal + "," + e)
print ("With a " + animal + "-" + animal + " here and a" + sound + "-" + sound + " there")
print ("Here a "+ sound+ " there a " +sound)
print ("Everywhere a" + sound + "-" + animal )
print ("Old Macdonald had a farm," + e)
Computers and Technology
1 answer:
jeyben [28]3 years ago
4 0

animal = input("Enter an animal: ")

sound = input("Enter a sound: ")

e = "E"

print("Old Macdonald had a farm, " + e)

print("And on his farm he had a " + animal + ", " + e)

print("With a " + animal + "-" + animal + " here and a " + sound + "-" + sound + " there")

print("Here a " + sound + " there a " + sound)

print("Everywhere a " + sound + "-" + animal)

print("Old Macdonald had a farm, " + e)

This works for me. Best of luck.

You might be interested in
I need help with question 3 I’ll give brainliest
Semmy [17]

Answer:

D) Engineering and Technology

Explanation:

Brent Designs or <em>Engineers </em>the equipment or<em> Technology </em>that is used to keep the plant safe.

7 0
3 years ago
Read 2 more answers
Which of these are correctly formatted Python tuples? CHECK ALL THAT APPY.
grin007 [14]
I think C is correct I looked into some Python and that would seam like the most logical answer
4 0
3 years ago
Read 2 more answers
Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a program named MoveEstimator that
jeka94

Answer:

import java.util.Scanner;

public class MoveEstimator

{

public static void main(String[] args) {

   

    Scanner input = new Scanner(System.in);

    final int BASE_RATE = 200, RATE_PER_HOUR = 150, RATE_PER_MILE = 2;

    int hours, miles;

    double totalFee = 0.0;

   

 System.out.print("Enter the number of hours for a job: ");

 hours = input.nextInt();

 System.out.print("Enter the number of miles: ");

 miles = input.nextInt();

 

 totalFee = BASE_RATE + (hours * RATE_PER_HOUR) + (miles * RATE_PER_MILE);

 System.out.printf("For a move taking %d hours and going %d miles the estimate is $%.2f", hours, miles, totalFee);

}

}

Explanation:

*The code is in Java.

Create the Scanner object to be able to get input

Initialize the constant values using final keyword, BASE_RATE, RATE_PER_HOUR, RATE_PER_MILE

Declare the variables, hours, miles, totalFee

Ask the user to enter the hours and miles

Calculate the totalFee, add BASE_RATE, multiplication of  hours and RATE_PER_HOUR, multiplication of  miles and RATE_PER_MILE

Print the output as in required format

6 0
3 years ago
Which of the following shows the assignment of a string to a variable? Select 3 options.
satela [25.4K]

Answer:

23, (23)

Explanation:

7 0
3 years ago
Read 2 more answers
Fryshta is using the Help window in PowerPoint to learn about inserting Smart Shapes into a presentation. She currently has a He
Rainbow [258]

Answer: Pin

Explanation:

Pin button is the button that is used for sticking or saving the ideas from the windows or web on that very place.This feature helps in reviewing or getting the idea back later anytime from the window as per users need. User use this button for saving any food recipe, steps of any process, guidelines etc.

  • According to the question, Fryshta can use pin button from the help window for sticking or pinning the steps of inserting shapes in her presentation.She can have a look at the steps whenever she want.
8 0
3 years ago
Other questions:
  • Explain which are of the brain you think might light up to show that you are telling a lie and why
    10·1 answer
  • Type the correct answer in the box spell all words correctly
    8·1 answer
  • Important tools used in the _____ phase of the DMAIC process include a project charter, a description of customer requirements,
    13·1 answer
  • Most people entering the construction industry learn a specific craft through:
    14·2 answers
  • Lewis is using a stylus with his touch screen computer in order to draw a
    8·1 answer
  • Explain and give examples of at least two search engines.
    9·1 answer
  • Write a program with a loop that lets the user enter a series of positive integers. The user should enter −1 to signal the end o
    7·1 answer
  • Question 1
    10·1 answer
  • Which line of code will eliminate the element “calculator” from an array of supplies?
    13·1 answer
  • Importancia del sistema operativo
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!