برنامج يعد الحروف [a,i,o,u,e] بلغة بايثون A Program That counts the letters A, O, U, E, I in Python

تفاصيل العمل

لقد قمت بعمل برنامج بلغة بايثون يعد الحروف [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"))

بطاقة العمل

اسم المستقل
عدد الإعجابات
0
عدد المشاهدات
37
تاريخ الإضافة
تاريخ الإنجاز
المهارات