Submit Assignment
What is the assignment?
What to hand in?
What needs to be done?
Be careful…
Getting Started
import math
import unittestdef findWaterContainerPath(a, b, c):
""" DOCUMENTATION FOR THIS FUNCTION """
starting_state = (0, 0)
final_path = list()
final_path.append(starting_state)
""" THIS IS WHERE THE REAL WORK FOR THIS ASSIGNMENT WILL BE """
return final_path
""" ADD ANY OTHER (HELPER) FUNCTIONS THAT ARE NEEDED HERE """
class TestWaterContainerGraphSearch(unittest.TestCase):
def testFindWaterContainerPath(self):
""" INSERT DESCRIPTION OF WHAT THIS TEST IS CHECKING """
""" IMPLEMENT YOUR FIRST TEST HERE """
pass
""" ADD MORE TESTS TO CHECK YOUR FUNCTIONS WORKS FOR OTHER VALUES """
def main():
capacity_a = input("Enter the capacity of container A: ")
capacity_b = input("Enter the capacity of container B: ")
goal_amount = input("Enter the goal quantity: ")
# ADD SOME TYPE/VALUE CHECKING FOR THE INPUTS (OR INSIDE YOUR FUNCTION)
if int(goal_amount) % math.gcd(int(capacity_a), int(capacity_b)) == 0:
path = findWaterContainerPath(int(capacity_a), int(capacity_b), int(goal_amount))
else:
print("No solution for containers with these sizes and with this final goal amount")
print(path)
# unittest_main() - run all of TestWaterContainerGraphSearch's methods (i.e. test cases)
def unittest_main():
unittest.main()
# evaluates to true if run as standalone program
if __name__ == '__main__':
main()
unittest_main()
Good luck!
Assignment 5 RubricAssignment 5 RubricCriteriaRatingsPtsThis criterion is linked to a Learning OutcomeProgram Execution and Output30.0 to >25.0 ptsGoodProgram executes with no syntax or runtime errors and produces nearly all of the appropriate output when run through the test script (26pts – 30pts).25.0 to >10.0 ptsFairProgram executes with via the test script but does not produce all of the desired/correct output (11pts – 25pts).10.0 to >0 ptsPoorProgram does not execute via the test script without some modification and/or produces none or very little of the desired output in the test script (0pts – 10 pts).30.0 pts
This criterion is linked to a Learning OutcomeCode Logic and Design40.0 to >30.0 ptsGoodProgram has all required classes, variables, and methods defined (31pts – 40pts).30.0 to >10.0 ptsFairProgram has at least some but not all requisite classes, methods, or variables (11pts – 30pts).10.0 to >0 ptsPoorProgram has few or none of the classes, variables, or methods that were required (0pts – 10pts).40.0 pts
This criterion is linked to a Learning OutcomeCoding Standards and Documentation30.0 to >20.0 ptsGoodProgram has documentation for each class, method, function and this is displayed when using Python’s help function, “help()”. Documentation should clearly explain how and why methods are implemented as is (e.g. when and how does HashTable choose to resize itself). In addition to this, for full points the code should be consistently formatted, with consistency in how methods and variables are named (21pts – 30pts).20.0 to >10.0 ptsFairProgram has some documentation and is somewhat consistent in formatting, variable/method naming, etc. However, at least one of those is missing/incorrect (11pts – 20pts).10.0 to >0 ptsPoorProgram has little to no documentation, is not structured/formatted well, and does follow a consistent approach towards naming variables/method (0pts – 5pts).30.0 pts
This criterion is linked to a Learning OutcomeTesting10.0 to >5.0 ptsGoodProgram tests edge cases, or scenarios that would produce unexpected results using Python’s unittest (4pts – 5pts).5.0 to >2.0 ptsFairProgram tests for some edge cases but is missing important/obvious edge cases and may not be using unittest (3pts – 4pts).2.0 to >0 ptsPoorProgram has very few or no checks for edge cases, and does not make use of unittest (0pts – 2pts).10.0 pts
Total Points: 110.0PreviousNext
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more