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
Elena-2011 [213]
3 years ago
15

Write a program that reads one or more strings from the standard input and outputs the count of vowels, consonants, and digit ch

aracters found in the stream.
Computers and Technology
1 answer:
Illusion [34]3 years ago
7 0

Answer:

endinput = "no"

mylist = []

vowel = ['a', 'e', 'i', 'o', 'u']

vowelcount = 0

consonantcount = 0

digitcount = 0

string = " "

number = [ str(i) for i in range(0, 10)]

while endinput == "no":

   inputs = input("Enter string value: ")

   mylist.append(inputs)

   endinput = input("Do you want to end input? ( enter no to continue:  ")

for item in mylist:

   txt = item

   print(txt)

   for i in txt:

       if i == string:

           continue

       elif i in vowel:

           vowelcount +=1

       elif i in number:

           digitcount += 1

       else:

           consonantcount += 1  

print("Vowels: ", vowelcount)

print("Digits: ", digitcount)

print("Consonant: ", consonantcount)

Explanation:

The python program receives one or more strings from the standard input and appends it to a list. The algorithm iterates through the list of string values and counts the number of vowels, consonants, and digits.

You might be interested in
An electronic resume is a plain-looking document. True of False?
Contact [7]
I think it's TRUE!!!!!!!!!!
8 0
3 years ago
Read 2 more answers
In a word-processing program, what are the easily accessible icons that allow you to print, save and change fonts with a click o
Elan Coil [88]

The answer is A. tool bar

7 0
2 years ago
Implemente a função ao lado, que recebe um preço e um booleano indicando se já está com desconto ou não. Se o preço for maior qu
Andrew [12]

Answer:

function pecoDesconto(preco, estaComDesconto) {

 

 let p = preco;

 let desconto = estaComDesconto;

 if(p > 100 && desconto == false){

   return "Quero pechinchar";

 }else{

   return "Negócio fechado";

 }

}

Explanation:

function pecoDesconto(preco, estaComDesconto) {

 

 // Implemente a função ao lado, que recebe um preço//

 let p = preco;

// variavel que indica desconco//

 let desconto = estaComDesconto;

//Se o preço for maior que 100 e não estiver com desconto, a função deve retornar Quero pechinchar.//

 if(p > 100 && desconto == false){

   return "Quero pechinchar";

   //Caso contrário, deve retornar Negócio fechado

 }else{

   return "Negócio fechado"

 }

}

só te faltou ler com atenção, e um pouco de logica!

7 0
2 years ago
And, or, not are examples of boolean logic
forsale [732]

true a example  boolean logic is (and, or, and  not)

-scav

8 0
2 years ago
Create a static method called fillArray, which takes an integer array as an input parameter, along with an integer initial value
JulijaS [17]

Answer:

public class print{

   

   public static void fillArray(int[] arr, int initialValue){

       

       int n = arr.length;

      for(int i=0;i<n;i++){

          arr[i] = initialValue++;

      }

       for(int i=0;i<n;i++){

           System.out.print(arr[i]+" ");

      }

       

   }

    public static void main(String []args){

       

        int[] array = new int[5];

        int initialValue =3;

       

        fillArray(array,initialValue);

       

    }

}

Explanation:

Create the function with two parameter first is array and second is integer.

Then, declare the variable and store the size of array.

Take the for and fill the array from the incremented value of initialValue  by 1 at every run of loop.

After loop, print the element of the array.

Create the main function which is used for calling the function and also declare the array with size 5 and initialValue with 3. After that, call the function with this argument.

3 0
3 years ago
Other questions:
  • Write a program totake a depth (in kilometers) inside the earth as input data;compute
    15·1 answer
  • You are provisioning a server with eight-core 3 GHz CMP that can execute a workload with an overall CPI of 2.0 (assuming that L2
    5·1 answer
  • Which of the following statements is true?
    14·1 answer
  • What short (two letters!) but powerful boolean operator can check whether or not one string can be found in another string?
    12·1 answer
  • You are a technical support engineer and provide help desk support for the network in a manufacturing company. You receive a cal
    10·1 answer
  • Which one of the following statements is correct? a. Web browsers cannot function without cookies. b. Cookies are text files and
    9·1 answer
  • The Status bar is used to control the majority of the drafting settings in AutoCAD
    13·1 answer
  • In confirmatory visualization Group of answer choices Users expect to see a certain pattern in the data Users confirm the qualit
    9·1 answer
  • How to identify mistakes in a html code??​
    14·1 answer
  • Retail products are identified by their Universal Product Codes (UPCs). The most commonform of a UPC has 12 decimal digits: The
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!