Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Project 2 Lawn Service Estimation Application -- Revisited For your first programming project, you developed an application for a lawn service provider to use

Programming Project 2 Lawn Service Estimation Application -- Revisited For your first programming project, you developed an application for a lawn service provider to use to estimate the materials and labor costs needed to fertilize a lawn. The lawn service provider would like you to modify your application to allow the user to enter multiple rectangular areas of a yard to be fertilized. Your application will need to prompt the user to enter the dimensions of a rectangular area of a yard, compute the area rectangular region, display the regions dimensions and area, and add the area to a running total of yard area. After each area is entered you will prompt the user to ask if they want to enter another area. If they enter yes, you will enter the dimensions of another rectangular region of the yard. If they answer no, you will compute the cost of fertilizing the combined areas using a single application of fertilizer and a seasonal application with the 10% discount as you did in project 1. As before the cost for a single application of fertilizer to a 1/4-acre yard is $65 (1/4-acre contains 10,890 sq. ft). When the user is entering dimensions for each region, you must verify the values are all greater than zero. If the user enters an incorrect value for a dimension, you should display an appropriate error message prompt the user to try again. The following picture provides a conceptual view of the problem. Please note that there are depth and width associated with each yard area. Only the depth and width of yard area 1 is shown in the diagram. The following example illustrates the expected behavior of your program. First, prompt the user to input the dimensions of the yard. Enter the dimension of region 1 Enter the yard width: 60 Enter the yard depth: 70 Region 1 is 60 x 70 = 4,200 sq. ft. Do you want to enter another region (yes/no)? yes Yard Area 1 Yard Area 4 HOUSE Tree Area No fertilizer Area 1 Width Area 1 Depth Yard Area 2 Yard Area 3 Yard Area 5 Enter the dimension of region 2 Enter the yard width: 50 Enter the yard depth: 60 Region 2 is 50 x 60 = 3,000 sq. ft. Do you want to enter another region (yes/no)? no The estimated cost of the lawn treatment for an area of 20,550 sq. ft ---------------------------------------------------------------------------------------------- One application of fertilizer: $122.66 A full season of applications of fertilizer: $441.58 You save $49.06 by choosing a season of applications. If the user makes a mistake while entering either dimension, your program should behave as follows: Enter the dimension of region 1 Enter the yard width: -60 Error you enter a width of -60 which is invalid try again Enter the yard width: 0 Error you enter a width of 0 which is invalid try again Enter the yard width: 60 Enter the yard depth: 70 Region 1 is 60 x 70 = 4,200 sq. ft. Place your Python source code in a file named project2.py. Make sure the file contains a comment at the top of the file with the following: 1. Your name 2. The project name 3. The due date 4. A short description of the application (i.e. what does this project do) Also make sure you use meaningful variable names, use whitespace to improve readability and add a few comments to highlight major sections of code. By the assigned due date, submit the project2.py file to the project2 dropbox.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+ a. How does this change affect the incentives for working?

Answered: 1 week ago