We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7b2380 commit ec66b33Copy full SHA for ec66b33
__pycache__/ex9.cpython-310.pyc
391 Bytes
ex9.py
@@ -0,0 +1,7 @@
1
+def vowel_counter(sentence):
2
+ counter = 0
3
+ for i in sentence:
4
+ if(i == "a" or i == "e" or i == "i" or i == "o" or i == "u"):
5
+ counter += 1
6
+
7
+ return f"Number of vowels: {counter}"
main.py
@@ -48,7 +48,12 @@
48
# ex8
49
from ex8 import f_to_c, c_to_f
50
51
-print(f_to_c(22))
52
-print(c_to_f(-6))
+# print(f_to_c(22))
+# print(c_to_f(-6))
53
54
+# ex9
55
+from ex9 import vowel_counter
56
57
+sentence = "This is a test"
58
+num_vowels = vowel_counter(sentence)
59
+print(num_vowels)
0 commit comments