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
worty [1.4K]
3 years ago
5

In English there are five vowel letters in the alphabet: A, E, I, O, U. For the purposes of this exercise we won't count Y as a

vowel. Write a program that takes a line of text as input and outputs the number of vowels in the words. Make sure to account for both uppercase or lowercase. You are encouraged to write functions and test code in IDLE before submitting your solutions here.
Computers and Technology
1 answer:
Vikki [24]3 years ago
3 0

Answer:

s = input("Enter a sentence: ")

count = 0

for c in s:

 if "AEIOU".find(c.upper()) >= 0:

   count = count + 1

print ("There are %d vowels." % (count))

Explanation:

Just for fun, here is a super short one using regex:

import re

s = input("Enter a sentence: ")

print ("There are %d vowels." % len(re.findall("[aeiou]",s.lower())))

You might be interested in
Software (often on firmware) designed to make physical products and devices smarter by doing things like sharing usage informati
Katarina [22]

Answer:

Embedded System

Explanation:

Embedded System are designed to make physical products and devices and helping in diagnose problems as well.

3 0
3 years ago
Cranes can be operated by all of the following except:
Korolek [52]

Designated operators

4 0
3 years ago
You can perform an in-place upgrade to Windows 7 from both Windows XP and Windows Vista
lbvjy [14]

Answer:

okay, thanks for the info.

Explanation:

have a good day !

~evita

6 0
3 years ago
Who was Steven Jobs.
Aleks04 [339]

Answer:

Steve Jobs (Feb 24, 1955 – October 5, 2011) was an American businessman and inventor who played a key role in the success of Apple computers and the development of revolutionary new technology such as the iPod, iPad and MacBook

Explanation:

5 0
3 years ago
Read 2 more answers
Write a program that prompts the user for an integer and thenprints out all prime numbers up to that integer. For example,when t
MaRussiya [10]

Answer:

n=int(input("Enter number upto which you want to print prime numbers:\n"))#taking input of n in integer type..

for i in range(1,n): #looping over 1 to n.

   pr=True  #taking pr to be True..

   for div in range(2,i): #looping over 2 to i..

       if i%div==0:#if i is divisible by div then it is not prime

           pr=False#making pr false

   if pr and i!=1: #condition for printing

       print(str(i))#printing the prime numbers..

       

Explanation:

In the python program we have checked for every integer up to n that is is not divisible by any integer between 2 to n-1 both inclusive if it is then it is not a prime number.

8 0
3 years ago
Other questions:
  • Assume that word is a variable of type String that has been assigned a value. Assume furthermore that this value always contains
    13·2 answers
  • The computer stores a program while the program is running, as well as the data thatthe program is working with, in _____.
    10·1 answer
  • A work-study student receives a paycheck from:
    15·2 answers
  • Mintzberg's classification of organizational structure categorizes the knowledge-based organization where goods and services dep
    5·1 answer
  • It is a function that removes an existing file from the server.
    12·1 answer
  • HELP!!!<br> THIS HAPPENS EVERY TIME
    6·2 answers
  • What is the output?<br> str = 'abcdef<br> print(str[2:50)
    6·2 answers
  • Which of the following is an object-oriented language?
    11·1 answer
  • A laptop can be kept on palm to work. [true/false) ​
    5·1 answer
  • The federal communications commission oversees the programming of which entities?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!