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
What do you expect the future trends of an operating system in terms of, cost, size, multitasking, portability, simplicity
Anna71 [15]

Answer:

Size

Explanation:

thats it thats the answer

8 0
2 years ago
What are options in the Advanced tab in the Share Workbook dialog box? Check all that apply.
viva [34]

All options in the Advanced tab in the Share Workbook dialog box.

  • Don’t keep change history
  • Show comments made by all users
  • Update changes when file is saved
  • Track changes for certain amount of days
  • Allow changes by more than one user at a time
  • Automatically update changes in certain time periods

<u>Explanation:</u>

In shared workbook in advanced tab it has following options. Based on end user selection changes are applied on shares workbook.

1. Either keep the history for certain period or don’t keep the history on shared workbook.

2. On share work Save changes on period schedule (automatically update) or just see other user changes.

3. Before changes are made for share workbook either prompt for save option or last modified saved.

4.  Printer review and filter setting for personal view.

8 0
3 years ago
Read 2 more answers
Your worksheet has the value 27 in cell B3. What value is<br>returned by the function =MOD(B3,6)?​
Digiron [165]

Answer:

3

Explanation:

MOD means the remainder after a division calculation.

\frac{27}{6}= 4r3

The remainder is 3

5 0
3 years ago
If you are referencing cell (C2)in Excel and want to be able to copy the formula and keep using the data in cell C2 in every pla
sergiy2304 [10]

If you are referencing cell (C2)in Excel and want to be able to copy the formula and keep using the data in cell C2 in every place you copy it to, the way to reference the cell? is known to be $C$2.

<h3>What is a cell reference in Excel?</h3>

A cell reference is known to be called a cell address and this is seen as a make up of a column letter and also those of  row number that tells a cell on a worksheet.

Hence, If you are referencing cell (C2)in Excel and want to be able to copy the formula and keep using the data in cell C2 in every place you copy it to, the way to reference the cell? is known to be $C$2.

Learn more about cell referencing from

brainly.com/question/19035038

#SPJ1

8 0
2 years ago
Which network component connects a device with the transmission media and allows it to send?
yanalaym [24]
The wireless network I believe
5 0
3 years ago
Other questions:
  • You work administrative assistant in an engineering firm. A co-worker constantly makes fun of the engineers by whispering commen
    13·1 answer
  • A four-year old laptop will not boot and presents error messages on screen. You have verified with the laptop technical support
    11·1 answer
  • OSI is a seven-layered framework used to help define and organize the responsibilities of protocols used for network communicati
    6·1 answer
  • In 2-3 paragraphs, identify at least two ways technology and innovation have affected global economic competition. Provide a spe
    5·1 answer
  • Which of the following is the strongest password? Xo795&amp;A &amp;cGo9Tz F5h#3u9g vU7#$3T sC9$d&amp;cF5h#3u9g
    13·2 answers
  • What are informational sessions?
    10·1 answer
  • What are the pros and cons of the internet’s ability to access information
    8·2 answers
  • Which task is not possible with VLOOKUP?
    10·2 answers
  • Please help me on this I don't know which one they are​
    6·2 answers
  • _____ is a system in which a finite set of words can be combined to generate an infinite number of sentences.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!