Given a line of text as input, output the number of characters excluding spaces, periods, exclamation points, or commas. Ex: If the input is: Listen, Mr. Jones, calm down. the output is: 21 Note: Account for all characters that aren't spaces, periods, exclamation points, or commas (Ex: "r", "2", "?"). user_text = input() ''' Type your code here. '''

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question

Given a line of text as input, output the number of characters excluding spaces, periods, exclamation points, or commas.

Ex: If the input is:

Listen, Mr. Jones, calm down.

the output is:

21

Note: Account for all characters that aren't spaces, periods, exclamation points, or commas (Ex: "r", "2", "?").

user_text = input()

''' Type your code here. '''

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT