Question: Write a function countTo() that takes a integer as a parameter representing as a sum. The function will keep asking user to enter a number
Write a function countTo() that takes a integer as a parameter representing as a sum. The function will keep asking user to enter a number until the summation of the numbers the user has entered is greater than the sum. Then print out the summation and how many numbers are entered. For simplicity, user can only enter an integer. Otherwise a message should be displayed "Error". Language: Python
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
