برنامج يعد الكلمات بلغة بايثون . A program that counts the words in a string

تفاصيل العمل

لقد قمت بعمل مشروع بلغة بايثون يعد عدد الكلمات اللتي في النص اللذي أدخل له وأريد مشاركة الكود معكم.

I did a Python project that counts the number of words in the text I enter and I want to share the code with you.

def count_words(string: str):

string = string.split()

return len(string)

print(count_words("Moaz Omar Hamdy"))

بطاقة العمل

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