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

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!