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
jok3333 [9.3K]
3 years ago
12

Your program will read a word (or a whole line) from the user. It will then count the number of vowels in the word (or line) and

print put this value. You should ignore the semi-vowel y since determining its role requires dividing words into syllables which is hard to do in English. The program should end when the word END is entered. Example Input and Output: Enter a word: Vowel The word Vowel contains 2 vowels. Enter a word: determining The word determining contains 4 vowels. Enter a word: WILL The word WILL contains 1 vowel. Enter a word: END
Computers and Technology
1 answer:
Softa [21]3 years ago
4 0

Answer:

Following are the program in the Python Programming Language.

def vowel(): #define function

 print("Enter END to Break") #print message

 while(True): #set while loop

   word=input("Enter words: ") #get input from the user

   count=0 #set count to 0

   if(word=="END"): #set if condition

     break #terminate the loop

   else:

     for i in range(len(word)): #set the for loop

       c=word[i] #initialize in c

       if(c=='a'or c=='e' or c=='i'or c=='o'or c=='u'or c=='A'or c=='E'or c=='I'or c=='O'or c=='U'):

         count+=1 #increament in count by 1

     print("The word " , word , " contains " , count, end=" ")#print message

     if(count==1):#check condition

       print("vowel.")

     else:

       print("vowels")

#call the function

vowel()

Output:

Enter END to Break

Enter words: Vowel

The word  Vowel  contains  2 vowels

Enter words: END

Explanation:

Here, we define a function "vowel()" inside it.

  • Print message for the user.
  • Set the while loop and pass condition is True then, get input from the user in the variable "word" then, set variable "count" and initialize to 0.
  • Set if condition to check if the user input "END" then, the loop will terminate.
  • Otherwise, set for loop which continues from the length of the word.
  • Then, we set if statement which checks the vowel in the word, then increment in count by 1.
  • Print the message in the following format which is mentioned in the question.
  • Then, set if-else statement for check count is equal to 1 then print "vowel." Otherwise, it prints "vowels."

Finally, we call the following function "vowel()".

You might be interested in
To type the letter address, _________ space from the dateline
miskamm [114]

Answer: Double

Explanation:

I just took the test

4 0
3 years ago
Read 2 more answers
Given half a chance other people at work will take advantage of you
Damm [24]

have self-control and if you have a problem dont be afraid to speak your mind, show other people you mean buisness, but be polite to aviod starting more problems

3 0
3 years ago
If you have defined a class named SavingsAccount with a public static data member named numberOfAccounts, and created a SavingsA
Anvisha [2.4K]

Answer:

numAccounts = SavingsAccount.numberOfAccounts

Explanation:

In object oriented programming, when you have created an object of class, you can create several instances (objects) from that class by referencing the className.classFeild. In this instance SavingsAccount is the class name and

numberOfAccounts is a feild (or data member). to create a new numAccount, we use the syntax as above in the answer

3 0
4 years ago
which process consists of one application program following a logical access path (lap) and then a dbms following a physical acc
laiz [17]

A DBMS acts as a conduit between the database and the applications that will use it, enabling users to access, modify, and control how the data is arranged and optimized.

Data points that are connected to one another are stored and accessible in a relational database, which is a form of database. The relational model, an easy-to-understand method of representing data in tables, is the foundation of relational databases. Data items are requested from the database by application programs, which are created using a combination of the DBMS's data manipulation language and a traditional programming language. The DBMS locates and provides the data elements requested by the application programs.

Learn more about database here-

brainly.com/question/6447559

#SPJ4

5 0
1 year ago
The number of pixels displayed on the screen is known as ​
puteri [66]

Answer: Resolution

Explanation: The total number of pixels that can be displayed on the screen at a time is called the resolution of the screen. This resolution is normally described in the pair of numbers, such as 2560 x 1440. This means, the computer screen is 2560 pixels wide and 1440 pixels tall.

4 0
3 years ago
Other questions:
  • Tower defense is included under which genre of game
    15·2 answers
  • These systems consist of interlinked knowledge resources, databases, human experts, and artificial knowledge agents that collect
    9·1 answer
  • Advancement in technology is making peripherals...
    5·2 answers
  • Which of the following describe a required
    7·1 answer
  • Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. Promp
    10·1 answer
  • Brainliest to whoever answers this first, i need help explaining.
    8·1 answer
  • What does Putting a word in quotation marks on your search bar do on google?
    12·1 answer
  • Need the answer ASAP!!!
    5·1 answer
  • Write the functions of F1 to F12 on the keyboard​
    5·2 answers
  • Which of the expressions is false? when a = 10 and b = 4
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!