Skip to content

Commit ec66b33

Browse files
committed
9/13
1 parent f7b2380 commit ec66b33

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

__pycache__/ex9.cpython-310.pyc

391 Bytes
Binary file not shown.

ex9.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@
4848
# ex8
4949
from ex8 import f_to_c, c_to_f
5050

51-
print(f_to_c(22))
52-
print(c_to_f(-6))
51+
# print(f_to_c(22))
52+
# print(c_to_f(-6))
5353

54+
# ex9
55+
from ex9 import vowel_counter
5456

57+
sentence = "This is a test"
58+
num_vowels = vowel_counter(sentence)
59+
print(num_vowels)

0 commit comments

Comments
 (0)