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
GMI = $4,666.67 Total Monthly Deductions $1,131.00 What is the Net Monthly Income (GMI - Total Monthly Deductions) =
Kisachek [45]

Answer:

Net Monthly Income = $3,535.67

Explanation:

Given:

GMI = $4,666.67

Total Monthly Deductions = $1,131

Find:

Net Monthly Income

Computation:

Net Monthly Income = GMI - Total Monthly Deductions

Net Monthly Income = $4,666.67 - $1,131

Net Monthly Income = $3,535.67

6 0
3 years ago
___________ is a technique that uses IT to develop an ongoing relationship with the purchasers or buyers of an organization's pr
Diano4ka-milaya [45]

Answer:

Customer relationship management.

Explanation:

Customer Relationship Management provides the controls overall the relationships of business between the clients and potential customers to getting the profit in the business The main objective of Customer Relationship Management is to enhance the relationships between businesses.  

Customer Relationship Management builds the ongoing partnership with the purchasers or purchasers of the commodity of an organization to optimize the value that the company can offer over time.

5 0
3 years ago
Edmund wants to visit his office website. Which software application would he use?
ollegr [7]
He would use a browser!
3 0
4 years ago
Read 2 more answers
What is the definition of Technology?
Rashid [163]

Answer:

The first one A.

Explanation:

7 0
3 years ago
While conducting a vulnerability assessment, you're given a set of documents representing the network's intended security config
Sophie [7]

Answer:

The baseline review

Explanation:

Solution:

The baseline review: this can be defined as the gap analysis or the beginning environmental review (IER). it is an assess study to get information about an organisation's present activities and associated environmental impacts,  impacts and legal requirements.

This review issues an overview of the quality and weaknesses of an organisation’s environmental execution and opportunities for improvement.

6 0
3 years ago
Other questions:
  • Can someone can help me am dont know how much RAM do i need. I use my pc for work and to watch yt vid. Thanks​
    10·1 answer
  • Given a normally distributed data set of 500 observations measuring tree heights in a forest,
    6·1 answer
  • In computer Drag and Drop“ means to select the items, hold down the mouse and
    15·1 answer
  • Create the logic for a game that simulates rolling two dice by generating two random numbers between 1 and 6 inclusive. The play
    7·1 answer
  • What is binary number system? Why is it used in computer system?
    13·2 answers
  • WILL GIVE BRAILIST IF ANSWER RIGHT
    11·1 answer
  • As computer words get larger and larger, there is a law of diminishing returns: the speed of execution of real application progr
    8·1 answer
  • A ___ is an online collaborative event that may include such features as chat, slideshows, and PowerPoint presentations.
    8·1 answer
  • Felicity wants to capture the attention of the regular subway commuters in her area though her print advertisements​
    13·1 answer
  • ASAP PLEASE the online research you did to describe how Senet is related to the culture and historical period when it was create
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!