Question: Project 0: Using Pytest This source file performs simple arithmetic calculations. However, some of them evaluate incorrectly. If you run pytest, you will see

""" Project 0: Using Pytest This source file performs simple arithmetic calculations. However, some of them evaluate incorrectly. If you run pytest, you will see that some of the tests will fail. You will also notice that the pylint score is fairly low. Your job is to fix the functions and make the pylint score >= 8.5 """ global integers def add(num1, num2): """Adds num1 to num2""" return num1 + num2 def subtract(num1, num2): """Subtract num1 from num2""" return num2 - num1 def multiply(num1, num2): """Multiply num1 and num2""" return num1 * num2 def divide(num1, num2): return num2 / num1 def int_to_string(num): x = "" for c in x: if x == num: print(x) if num == x: print(x) else: pass return num def main(): global integers integers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] print(add(integers[0], integers[0])) print(subtract(integers[0], integers[0])) print(multiply(integers[0], integers[0])) print(divide(integers[0], integers[0])) print(int_to_string(integers[0])) if __name__ == "__main__": main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!