program5_2.py 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. import math def main():     length = int(input("Enter the floor length in feet "))      width = int(input("Enter the floor width in feet "))     numberOfCleanings = int(input("Enter the monthly number of cleanings "))     pricePerSqYrd = 0.45     area = getSqYrds (length, width)     charge = printCleaningCost (area,pricePerSqYrd)     if numberOfCleanings==1:         print("Cleaning cost $",math.ceil(charge))     else:         print("Cleaning cost $",charge,numberOfCleanings," times monthly $",charge*numberOfCleanings)    def getSqYrds (length, width):     yards = (length * width *0.111)     return yards      def printCleaningCost (areaSqYrd, pricePerSqYrd) :     return areaSqYrd*pricePerSqYrd if __name__ == "__main__":      main() program5_3.py See if __name__ == '__main__': What is this? in Learn Here for this one. Make a copy of program5_2.py named program5_3.py. Then, modify it to import and use program5_2 as a module file. The sample outputs should be the same.  Check the first question and help me solve the second one.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Topic Video
Question

program5_2.py
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.

import math
def main():
    length = int(input("Enter the floor length in feet ")) 
    width = int(input("Enter the floor width in feet "))
    numberOfCleanings = int(input("Enter the monthly number of cleanings "))
    pricePerSqYrd = 0.45
    area = getSqYrds (length, width)
    charge = printCleaningCost (area,pricePerSqYrd)
    if numberOfCleanings==1:
        print("Cleaning cost $",math.ceil(charge))
    else:
        print("Cleaning cost $",charge,numberOfCleanings," times monthly $",charge*numberOfCleanings)
  
def getSqYrds (length, width):
    yards = (length * width *0.111)
    return yards
    
def printCleaningCost (areaSqYrd, pricePerSqYrd) :
    return areaSqYrd*pricePerSqYrd

if __name__ == "__main__":
     main()

program5_3.py
See if __name__ == '__main__': What is this? in Learn Here for this one.
Make a copy of program5_2.py named program5_3.py. Thenmodify it to import and use program5_2 as a module file. The sample outputs should be the same. 

Check the first question and help me solve the second one.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY