Question: FIND OUT THE ERROR AND CORRECT IT PLEASE THANK YOU IN PYTHON Statement: Users will provide several numbers. We will add the 1st, subtract the
FIND OUT THE ERROR AND CORRECT IT PLEASE THANK YOU IN PYTHON

Statement: Users will provide several numbers. We will add the 1st, subtract the 2nd, add the 3rd and so on. This process will continue, until the user has put a blank line as an input (mentioned in the prelab report). Sample input: Please enter a number: 24 Please enter a number: 5 Please enter a number: 1 Please enter a number: 10 Please enter a number: 36 Please enter a number: 67 Please enter a number: Sample output: The result is = -21 The above output is obtained from 24 -5 +1 -10 + 36 - 67 = -21 Hints: Instead of just adding or subtracting the numbers (which can get complicated), why not multiply every 2nd number by -1 and then add it.] Below is the python code. sign = -1 S = input("Please enter a number: ") while s == "" sign = sign total = sign*temp s = input("Please enter a number: ") print("The result is: %d", total)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
