Question: PYTHON Write a program to enter a valid variable till the user wants to end. The program should display the count of positive, negative, zeros

PYTHON

Write a program to enter a valid variable till the user wants to end. The program should display the count of positive, negative, zeros and letters (upper and lower case)/symbols (error handling) entered.

Based on the problem, you need to design an algorithm as follows:

1. Get the user input until n is entered

2. Add to the positive if it is greater than zero

3. Add to the negative if it is less than zero

4. Add to the zero if it is neither less than or greater than zero

5. Add to the letters/symbols if it none of the above

6. Output the totals as seen in sample output

Note: You need to prompt the user for input and continue to do so until n is selected and produce the specified output! (See below)

Hint: Use a Loop

Sample Output

User input: Enter input : 56

Do you want to Continue(y/n)? y

Enter input : -9

Output:

Positive Number(s) : 3

Negative Number(s) : 4

Zero(s) : 2 Letter(s) : 1

Symbol(s): 1

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!