Create the following, in Python: You have a business that cleans floors in commercial space and offices. You charge customers $0.45 per square yard, and some customers require multiple cleanings every month. You need two custom functions for your business. The first function takes a floor's length and width in feet and returns the area in square yards.  The second void function takes the area, charge per square yard, and number of monthly cleanings as arguments and prints the cleaning cost. This latter function uses selection (if...else) logic to print different output for single and multiple monthly cleanings (see Sample Outputs). Use a properly named constant for the charge per square yard, too.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create the following, in Python:

You have a business that cleans floors in commercial space and offices. You charge customers $0.45 per square yard, and some customers require multiple cleanings every month. You need two custom functions for your business. The first function takes a floor's length and width in feet and returns the area in square yards.  The second void function takes the area, charge per square yard, and number of monthly cleanings as arguments and prints the cleaning cost. This latter function uses selection (if...else) logic to print different output for single and multiple monthly cleanings (see Sample Outputs). Use a properly named constant for the charge per square yard, too.

**Floor Cleaning Cost Calculation**

To calculate the monthly cost of cleaning a floor based on its dimensions and the frequency of cleaning, follow the steps below:

1. **Enter the Floor Length:**
   - Length: 90 feet

2. **Enter the Floor Width:**
   - Width: 60 feet

3. **Enter the Monthly Number of Cleanings:**
   - Number of times cleaned per month: 2

The cleaning cost for this example is $270.00 per cleaning session. If the floor is cleaned twice a month, the total monthly cleaning cost can be calculated as follows:

\[ \text{Total Monthly Cleaning Cost} = \text{Cost per Cleaning Session} \times \text{Number of Cleanings per Month} \]

\[ \text{Total Monthly Cleaning Cost} = \$270.00 \times 2 = \$540.00 \]

The information provided confirms the calculations: 
- Cleaning cost: $270.00 per session
- Number of cleanings: 2 times per month
- Total monthly cleaning cost: $540.00
Transcribed Image Text:**Floor Cleaning Cost Calculation** To calculate the monthly cost of cleaning a floor based on its dimensions and the frequency of cleaning, follow the steps below: 1. **Enter the Floor Length:** - Length: 90 feet 2. **Enter the Floor Width:** - Width: 60 feet 3. **Enter the Monthly Number of Cleanings:** - Number of times cleaned per month: 2 The cleaning cost for this example is $270.00 per cleaning session. If the floor is cleaned twice a month, the total monthly cleaning cost can be calculated as follows: \[ \text{Total Monthly Cleaning Cost} = \text{Cost per Cleaning Session} \times \text{Number of Cleanings per Month} \] \[ \text{Total Monthly Cleaning Cost} = \$270.00 \times 2 = \$540.00 \] The information provided confirms the calculations: - Cleaning cost: $270.00 per session - Number of cleanings: 2 times per month - Total monthly cleaning cost: $540.00
### Floor Cleaning Cost Calculation

To calculate the cleaning cost for a specific floor size, follow the inputs and outputs given below:

1. **Floor Length and Width:**
   - Enter the floor length in feet: **60**
   - Enter the floor width in feet: **30**

2. **Monthly Number of Cleanings:**
   - Enter the monthly number of cleanings: **1**

3. **Calculated Cleaning Cost:**
   - Cleaning cost: **$90.00**

This example demonstrates how to input the dimensions of a floor and the frequency of cleanings to calculate the monthly cleaning cost, which is $90.00 in this case.
Transcribed Image Text:### Floor Cleaning Cost Calculation To calculate the cleaning cost for a specific floor size, follow the inputs and outputs given below: 1. **Floor Length and Width:** - Enter the floor length in feet: **60** - Enter the floor width in feet: **30** 2. **Monthly Number of Cleanings:** - Enter the monthly number of cleanings: **1** 3. **Calculated Cleaning Cost:** - Cleaning cost: **$90.00** This example demonstrates how to input the dimensions of a floor and the frequency of cleanings to calculate the monthly cleaning cost, which is $90.00 in this case.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education