Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
Assume s is a string of lower case characters. Write a program that counts up the number of vowels contained in the string s. V...Asked by GBADEBO
Assume S is a string of lower case characters. Write a program that counts up the number of vowels contained in the string S. Valid vowels are 'a', 'e', 'I', 'o', and 'u'. For example, if S='azcbobobegghakl' your program should print: Number of Vowels:5
Answers
Answered by
Adeleke Oladapo
s = raw_input('supply a string')
s = s.lower()
s = list(s)
v = ['a','e','i','o','u']
c = 0
for a in s:
if a in v:
c+=1
print "the answer is ", c
s = s.lower()
s = list(s)
v = ['a','e','i','o','u']
c = 0
for a in s:
if a in v:
c+=1
print "the answer is ", c
Answered by
Adeleke Oladapo
Gbadebo, I'm sure u'r a FUTA 200L student, a friend also gave me ds question, plus d other two u posted. I already solved bur she stopped me frm posting dm online. You can contact me @ 08020803585
Answered by
Anonymous
s = raw_input('supply a string')
s = s.lower()
s = list(s)
v = ['a','e','i','o','u']
c = 0
for a in s:
if a in v:
c+=1
s = s.lower()
s = list(s)
v = ['a','e','i','o','u']
c = 0
for a in s:
if a in v:
c+=1
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.