لقد قمت بعمل برنامج بلغة بايثون يعد الحروف [a,i,o,u,e] بلغة بايثون وأريد المشاركة الكود معكم.
def count_vowels(string):
counter = 0
for char in string:
if char in 'aioueAIOUE':
counter += 1
return counter
وهنا قمت بتجربة الكود
print(count_vowels("Moaz"))
I made a Python program that counts the letters [a,i,o,u,e] in Python and I want to share the code with you.
def count_vowels(string):
counter = 0
for char in string:
if char in 'aioueAIOUE':
counter += 1
return counter
And here I tried the code
print(count_vowels("Moaz"))