Get the information you need from a community of experts on IDNLearn.com. Join our interactive Q&A community and access a wealth of reliable answers to your most pressing questions.
Sagot :
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())))
In this exercise we have to use the knowledge of computational language in Python, so we have that code is:
It can be found in the attached image.
So, to make it easier, the code in Python can be found below:
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))
See more about python at brainly.com/question/26104476
Thank you for using this platform to share and learn. Keep asking and answering. We appreciate every contribution you make. IDNLearn.com provides the best answers to your questions. Thank you for visiting, and come back soon for more helpful information.