The code was already written for last week - just need it modified as a part of week 4 assignment is modifying my code/program for last week
This is what the word document has to look like By this point in learning how to program you might ask yourself, How do I know if my program is working correctly? That is not an easy question to answer. If you run your program and it terminates with a Syntax Error, you obviously have made a mistake somewhere. But what if it does not terminate? What happen if it executes and produces output? How do you know the output is correct? One of the most common ways to gain confidence in your program is to write and execute Test Cases. A Test Case is a test that you will perform on your program and it will either Pass or Fail the test. There are many ways to write Test Cases. Some are more formal than others. We are going to use a very informal way to write Test Cases. A Test Case has only two parts: Input and Expected Output. The Input is a set of input values to the program and Expected Output is the correct output for that set. A set of Test Cases is called a Test Plan or Test Suite. When you execute your program with the input values in the Test Plan you can generate a Test Report. A Test Report has the Test Cases along with Actual Output and Result. Actual Output is the output that the program gave for the input. Result is either Pass or Fail. Let us look at an example. I would like to create a program to determine if three lengths can form a Triangle. So, the sum of any two sides cannot be shorter than the third side. Here is the program that was created. It seems to work. print("The program will determine if 3 sides can form a triangle.") print("Enter side 1") side1 = eval(input()) print("Enter side 2") side2 = eval(input()) print("Enter side 3") side3 = eval(input()) if (side1 + side2 < side3):="" ="" ="" print("not="" triangle")="" elif="" (side2="" +="" side3="">< side1): print("not triangle") else: print("triangle") here is a set of test cases, or test plan/suite, that we can make for this program. test case input expected output 1 side 1 = 2 side 2 = 2 side 3 = 3 triangle 2 side 1 = 2 side 2 = 10 side 3 = 4 not triangle 3 side 1 = 1 side 2 = 1 side 3 = 4 not triangle 4 side 1 = 10 side 2 = 10 side 3 = 10 triangle 5 side 1 = 2 side 2 = 10 side 3 = 2 not triangle now, i will execute all of the test cases and generate a test report. test case input expected output actual output result 1 side 1 = 2 side 2 = 2 side 3 = 3 triangle triangle pass 2 side 1 = 2 side 2 = 10 side 3 = 4 not triangle not triangle pass 3 side 1 = 1 side 2 = 1 side 3 = 4 not triangle not triangle pass 4 side 1 = 10 side 2 = 10 side 3 = 10 triangle triangle pass 5 side 1 = 2 side 2 = 10 side 3 = 2 not triangle triangle fail after running the test plan/suite i see that not all of my test cases have passed. that means that i have a mistake somewhere in my program. after examining the program i see that i never check for the situation when the sum of sides 1 and 3 are less than side 2. week 4 assignment top of form hide assignment information instructions this week's assignment involves rewriting the python program you wrote for your assignment last week to use a function. all the requirements from last week still apply. the function should accept the number of rooms, and the type of cleaning as parameters and should return the cost of of the house cleaning. the main program should prompt the user for the number of rooms in the house and whether the cleaning should be a light cleaning or a more complete one, it should call the function that computes the cost and should output the value the function returns. if your program from last week contained any bugs, you should correct them in this submission. your program should include comments for the major steps of your code. you should already have these in your design/pseudocode. also document the values you chose as the cutoffs for the three house sizes, the cost for each size and the surcharge for a more complete cleaning in your comments as well. you are to submit your python program as a .py file. in addition, you are also to submit a test plan in a word document or a .pdf file. grading rubric meets does not meet design 15% comments include major design steps and specify values of chosen constants comments do not include major design steps and specify values of chosen constants python code 70% python code runs correctly on all test cases python code does not run correctly on all test cases test report 15% test report submitted with sufficient test cases test report not submitted bottom of form side1):="" ="" ="" print("not="" triangle")="" else:="" ="" ="" print("triangle")="" here="" is="" a="" set="" of="" test="" cases,="" or="" test="" plan/suite,="" that="" we="" can="" make="" for="" this="" program.="" test="" case="" input="" expected="" output="" 1="" side="" 1="2" side="" 2="2" side="" 3="3" triangle="" 2="" side="" 1="2" side="" 2="10" side="" 3="4" not="" triangle="" 3="" side="" 1="1" side="" 2="1" side="" 3="4" not="" triangle="" 4="" side="" 1="10" side="" 2="10" side="" 3="10" triangle="" 5="" side="" 1="2" side="" 2="10" side="" 3="2" not="" triangle="" now,="" i="" will="" execute="" all="" of="" the="" test="" cases="" and="" generate="" a="" test="" report.="" test="" case="" input="" expected="" output="" actual="" output="" result="" 1="" side="" 1="2" side="" 2="2" side="" 3="3" triangle="" triangle="" pass="" 2="" side="" 1="2" side="" 2="10" side="" 3="4" not="" triangle="" not="" triangle="" pass="" 3="" side="" 1="1" side="" 2="1" side="" 3="4" not="" triangle="" not="" triangle="" pass="" 4="" side="" 1="10" side="" 2="10" side="" 3="10" triangle="" triangle="" pass="" 5="" side="" 1="2" side="" 2="10" side="" 3="2" not="" triangle="" triangle="" fail="" after="" running="" the="" test="" plan/suite="" i="" see="" that="" not="" all="" of="" my="" test="" cases="" have="" passed. ="" that="" means="" that="" i="" have="" a="" mistake="" somewhere="" in="" my="" program. ="" after="" examining="" the="" program="" i="" see="" that="" i="" never="" check="" for="" the="" situation="" when="" the="" sum="" of="" sides="" 1="" and="" 3="" are="" less="" than="" side="" 2.="" week="" 4="" assignment="" top="" of="" form="" hide="" assignment="" information="" instructions="" this="" week's="" assignment="" involves="" rewriting="" the="" python="" program="" you="" wrote="" for="" your="" assignment="" last="" week="" to="" use="" a="" function.="" all="" the="" requirements="" from="" last="" week="" still="" apply.="" the="" function="" should="" accept="" the="" number="" of="" rooms,="" and="" the="" type="" of="" cleaning="" as="" parameters="" and="" should="" return="" the="" cost="" of="" of="" the="" house="" cleaning.="" the="" main="" program="" should="" prompt="" the="" user="" for="" the="" number="" of="" rooms="" in="" the="" house="" and="" whether="" the="" cleaning="" should="" be="" a="" light="" cleaning="" or="" a="" more="" complete="" one,="" it="" should="" call="" the="" function="" that="" computes="" the="" cost="" and="" should="" output="" the="" value="" the="" function="" returns.="" if="" your="" program="" from="" last="" week="" contained="" any="" bugs,="" you="" should="" correct="" them="" in="" this="" submission.="" your="" program="" should="" include="" comments="" for="" the="" major="" steps="" of="" your="" code. ="" you="" should="" already="" have="" these="" in="" your="" design/pseudocode. ="" also="" document="" the="" values="" you="" chose="" as="" the="" cutoffs="" for="" the="" three="" house="" sizes,="" the="" cost="" for="" each="" size="" and="" the="" surcharge="" for="" a="" more="" complete="" cleaning="" in="" your="" comments="" as="" well.="" you="" are="" to="" submit="" your="" python="" program="" as="" a .py file.="" in="" addition,="" you="" are="" also="" to="" submit="" a="" test="" plan="" in="" a="" word="" document="" or="" a .pdf file.="" grading="" rubric="" meets="" does="" not="" meet="" design="" 15%="" comments="" include="" major="" design="" steps="" and="" specify="" values="" of="" chosen="" constants="" comments="" do="" not="" include="" major="" design="" steps="" and="" specify="" values="" of="" chosen="" constants="" python="" code="" 70%="" python="" code="" runs="" correctly="" on="" all="" test="" cases ="" python="" code="" does="" not="" run="" correctly="" on="" all="" test="" cases="" test="" report="" 15%="" test="" report="" submitted="" with="" sufficient ="" test="" cases="" test="" report="" not="" submitted="" bottom="" of=""> side1): print("not triangle") else: print("triangle") here is a set of test cases, or test plan/suite, that we can make for this program. test case input expected output 1 side 1 = 2 side 2 = 2 side 3 = 3 triangle 2 side 1 = 2 side 2 = 10 side 3 = 4 not triangle 3 side 1 = 1 side 2 = 1 side 3 = 4 not triangle 4 side 1 = 10 side 2 = 10 side 3 = 10 triangle 5 side 1 = 2 side 2 = 10 side 3 = 2 not triangle now, i will execute all of the test cases and generate a test report. test case input expected output actual output result 1 side 1 = 2 side 2 = 2 side 3 = 3 triangle triangle pass 2 side 1 = 2 side 2 = 10 side 3 = 4 not triangle not triangle pass 3 side 1 = 1 side 2 = 1 side 3 = 4 not triangle not triangle pass 4 side 1 = 10 side 2 = 10 side 3 = 10 triangle triangle pass 5 side 1 = 2 side 2 = 10 side 3 = 2 not triangle triangle fail after running the test plan/suite i see that not all of my test cases have passed. that means that i have a mistake somewhere in my program. after examining the program i see that i never check for the situation when the sum of sides 1 and 3 are less than side 2. week 4 assignment top of form hide assignment information instructions this week's assignment involves rewriting the python program you wrote for your assignment last week to use a function. all the requirements from last week still apply. the function should accept the number of rooms, and the type of cleaning as parameters and should return the cost of of the house cleaning. the main program should prompt the user for the number of rooms in the house and whether the cleaning should be a light cleaning or a more complete one, it should call the function that computes the cost and should output the value the function returns. if your program from last week contained any bugs, you should correct them in this submission. your program should include comments for the major steps of your code. you should already have these in your design/pseudocode. also document the values you chose as the cutoffs for the three house sizes, the cost for each size and the surcharge for a more complete cleaning in your comments as well. you are to submit your python program as a .py file. in addition, you are also to submit a test plan in a word document or a .pdf file. grading rubric meets does not meet design 15% comments include major design steps and specify values of chosen constants comments do not include major design steps and specify values of chosen constants python code 70% python code runs correctly on all test cases python code does not run correctly on all test cases test report 15% test report submitted with sufficient test cases test report not submitted bottom of form>