Design a python program that asks the user to enter a string.  The string will then be displayed back to the user.  This is followed by determining the number of alphabetic characters, numeric characters, lowercase letters, uppercase letters, whitespace characters and then displaying them.  The user should be given additional chances to enter additional strings, and each time a string is entered, the above process is to be performed.  The inputting is to stop, when the user enters "end" as the input string. At that point, total number of alphabetic characters, numeric characters, lowercase letters, uppercase letters, whitespace characters are to be displayed and the program terminated.   An algorithm: 1. Prompt the user to enter a string at the keyboard 2. As long as the string is not "end"       2.1 Display the string, along with an appropriate message       2.2  Examine the current character of the string          2.2.1 If it's alphabetic, update the alphabetic_counter and the total_alphabetic_counter          2.2.2 If it's numeric, update the numeric _counter and the total_numeric_counter          2.2.3 If it's a lower_case letter, update the lower_case _counter and the                   total_lower_case_counter          2.2.4 If it's a upper_case letter, update the upper_case _counter and the                   total_upper_case_counter          2.2.5 If it's a whitespace character, update the whitespace _counter and the                   total_whitespace_counter           2.2.6 Continue from step 2.2 with the next character until done with this string        2.3 Display the  alphabetic_counter,  numeric _counter,  lower_case _counter,                upper_case _counter, and  whitespace _counter, each on a separate line,               and each along with an appropriate message        2.4  Prompt the user to enter another string at the keyboard  3. Display the  total_alphabetic_counter,   total_ numeric _counter,        total_lower_case _counter, total_ upper_case _counter, and   total_ whitespace _counter,       each on a separate line, and each along with an appropriate message  4. Stop ================================================================================= NOTE 1:  The program will process alphabetic, numeric, and whitespace characters only. NOTE 2: A sample program run is attached below.  It illustrates user's interactions with the program:   ======================================================================= You need to set up a Python solution that is complete and workable.   For your solution to be complete, you must: Prompt the user for the specific input data asked for within the problem statement Does the appropriate processing on the entered input data Provide the output data asked for within the problem statement to the user For your solution to be workable: Your solution should be free of any type of errors (syntax, run-time, logic) You may want to develop an algorithm first, using pseudocode or flowchart You do NOT need to turn in any algorithm

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Design a python program that asks the user to enter a string.  The string will then be displayed back to the user.  This is followed by determining the number of alphabetic characters, numeric characters, lowercase letters, uppercase letters, whitespace characters and then displaying them.  The user should be given additional chances to enter additional strings, and each time a string is entered, the above process is to be performed.  The inputting is to stop, when the user enters "end" as the input string. At that point, total number of alphabetic characters, numeric characters, lowercase letters, uppercase letters, whitespace characters are to be displayed and the program terminated.

 

An algorithm:

1. Prompt the user to enter a string at the keyboard

2. As long as the string is not "end"

      2.1 Display the string, along with an appropriate message

      2.2  Examine the current character of the string

         2.2.1 If it's alphabetic, update the alphabetic_counter and the total_alphabetic_counter

         2.2.2 If it's numeric, update the numeric _counter and the total_numeric_counter

         2.2.3 If it's a lower_case letter, update the lower_case _counter and the

                  total_lower_case_counter

         2.2.4 If it's a upper_case letter, update the upper_case _counter and the

                  total_upper_case_counter

         2.2.5 If it's a whitespace character, update the whitespace _counter and the

                  total_whitespace_counter

          2.2.6 Continue from step 2.2 with the next character until done with this string

       2.3 Display the  alphabetic_counter,  numeric _counter,  lower_case _counter, 

              upper_case _counter, and  whitespace _counter, each on a separate line,

              and each along with an appropriate message

       2.4  Prompt the user to enter another string at the keyboard

 3. Display the  total_alphabetic_counter,   total_ numeric _counter,  

     total_lower_case _counter, total_ upper_case _counter, and   total_ whitespace _counter,

      each on a separate line, and each along with an appropriate message

 4. Stop

=================================================================================

NOTE 1: 

The program will process alphabetic, numeric, and whitespace characters only.

NOTE 2:

A sample program run is attached below.  It illustrates user's interactions with the program:

 

=======================================================================
You need to set up a Python solution that is complete and workable.  

For your solution to be complete, you must:


Prompt the user for the specific input data asked for within the problem statement
Does the appropriate processing on the entered input data
Provide the output data asked for within the problem statement to the user

For your solution to be workable:
Your solution should be free of any type of errors (syntax, run-time, logic)
You may want to develop an algorithm first, using pseudocode or flowchart
You do NOT need to turn in any algorithm

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 7 steps with 3 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education