1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sesenic [268]
3 years ago
10

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

Computers and Technology
2 answers:
Flauer [41]3 years ago
7 0

Answer:

<em>import java.util.Scanner;</em>

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner(System.in);</em>

<em>        System.out.println("Please enter a string of words");</em>

<em>        String n = in.nextLine();</em>

<em>        int count = 0;</em>

<em>        for (int i=0; i<n.length(); i++){</em>

<em>            if((n.charAt(i) != '.') &&(n.charAt(i) != ',') && (n.charAt(i) != ' ')){</em>

<em>                count++;</em>

<em>            }</em>

<em>        }</em>

<em>        System.out.println(count);</em>

<em>    }</em>

<em>}</em>

Explanation:

  1. Prompt User to input the string and assign to a variable
  2. SET count =0.
  3. Using a for loop iterate over the string
  4.  if((n.charAt(i) != '.') &&(n.charAt(i) != ',') && (n.charAt(i) != ' ')) then count =count +1.
  5.     PRINT count.

myrzilka [38]3 years ago
7 0

Answer:

user_text = input()

import re

str1= input("21 ")

pattern = '[a-zA-Z]'

count=0

i=0

while(i<=len(str1)-1):

  result = re.match(pattern, str1)

  if (result):

      count+=1

  else:

      continue

  i+=1

print("String Length:",count)

Explanation:

You might be interested in
Effective feedback should focus on the behavior, not the person.<br><br> True<br> False
Aleonysh [2.5K]
Your answer is False my fellow samurai
5 0
3 years ago
Read 2 more answers
Pls help brainliest
Anastasy [175]

the answer to the question is c. i hope this helps.

3 0
3 years ago
An effective team would never have​
MA_775_DIABLO [31]

Answer:

problems or struggles

Explanation:

i believe this because with an effective team most problems aren't there and you can understand and work out problems or struggles

4 0
3 years ago
Dropbox and Microsoft's OneDrive are both popular applications for storing files. What is a fundamental difference between Dropb
Paha777 [63]

The difference is that Dropbox  offers just 2 GB free storage space while  Microsoft's OneDrive gives 5 GB in terms of free storage space.

<h3>What is Microsoft OneDrive?</h3>

This  is known to be a file hosting software and it also does synchronization service given by Microsoft.

Some other  fundamental difference between Dropbox and OneDrive in terms of  Business is that Dropbox is known to often give unlimited storage for about $20 to paid user/month while OneDrive is said to only give unlimited storage for $10 per paid user/month.

Learn more about Dropbox from

brainly.com/question/20935392

5 0
2 years ago
LIST THE SKILLSET NEEDED FOR BECOMING A PROGRAMMER.
wolverine [178]

Answer:

Proficiency with programming languages.  

Learning concepts and applying them to other problems.  

Mathematical skills.  

Problem-solving capability.  

Communication skills.

Writing skills.  

Inquisitiveness.  

Self-motivation.

7 0
2 years ago
Other questions:
  • If someone receives a shock, or a piece of equipment is throwing sparks or arcing you should try to pull them away from the sour
    7·1 answer
  • Most large organizations store data through a strategy called a(n) ________ to promote efficient and safe use of data across the
    11·1 answer
  • Amazon SWF is restricts you to use a specific programming language when setting up a work flow
    8·1 answer
  • What is the range of possible sizes for side<br> x?<br> 4.0<br> 2.7
    8·1 answer
  • A _______________ is a security threat that may launch a worm through a Trojan horse or launch a denial-of-service attack at a t
    10·1 answer
  • Why are ethics important in PR?
    8·1 answer
  • Write the definition of a method named countPos that receives a reference to a Scanner object associated with a stream of input
    13·1 answer
  • Many companies use telephone numbers like 555-GET-Food so the number is easier for their customers to remember. On a standard te
    6·2 answers
  • Will give brainliest
    8·1 answer
  • 10 points + brainliest to first correect answer :) incorrect answers/ answers with no effort will be deleted this is easy im jus
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!