Question: PYTHON CODE: Create a Computation class with a default constructor (without parameters) allowing to perform various calculations on integers numbers. Create a method that will
PYTHON CODE: Create a Computation class with a default constructor (without parameters) allowing to perform various calculations on integers numbers. Create a method that will perform each of the following operations: a) calculate the factorial of an integer. b) calculate the sum of the first n integers 1 + 2 + 3 + .. + n. c) test if the given integer is a prime number or not. d) creates and displays the multiplication table of a given integer. Then create an allTablesMult() method to display all the integer multiplication tables 1, 2, 3, ..., 9. e) compute all the divisors of a given integer on new list called Ldiv. NOTE: Remember to test each method and display results. AND LABEL ALL THE COMPUTATIONS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
