Skip to content

Commit 1d6cb1d

Browse files
Create vowel_check.py
1 parent 03a4251 commit 1d6cb1d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

strings/vowel_check.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
String = input('Enter the string :')
2+
count = 0
3+
#to check for less conditions
4+
#keep string in lowercase
5+
String = String.lower()
6+
for i in String:
7+
if i == 'a' or i == 'e' or i == 'i' or i == 'o' or i == 'u':
8+
#if True
9+
count+=1
10+
#check if any vowel found
11+
if count == 0:
12+
print('No vowels found')
13+
else:
14+
print('Total vowels are :' + str(count))

0 commit comments

Comments
 (0)