Question: PYTHON Write a function called Series() that invites the user to enter a non-negative whole n. If the user enters a negative number, the function
PYTHON
Write a function called Series() that invites the user to enter a non-negative whole n. If the user enters a negative number, the function continues to invite him until he enters positive integer. The function must return the sum of the following series: 1000 + 1/1 -1/2 +1/3 - 1/4 + ... +1/n for a given integer n. for ex: for No = 0, the function must return 1000.0 for No. 1, the function must return 1001.0 for No. 2, the function must return 1001.25 for No. 3, the function must return 1001: 3611111111111 etc.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
