همآوایی به دنبالهای از کلمات اطلاق میشود که با یک حرف آغاز میشوند. برای این تمرین، یک جمله در صورتی همآوایی دارد که تمام کلماتی که بیش از ۳ حرف دارند با یک حرف آغاز شوند.
مثال
alliteration_correct("She swam to the shore.") ➞ True
# تمام کلمات دارای ۴ حرف یا بیشتر با حرف "s" شروع میشوند.
alliteration_correct("Maybel manages money well.") ➞ False
# کلمه "well" با حرف "m" شروع نمیشود.
    نمونه ورودی و خروجی
AlliterationCorrect("She swam to the shore.") ➞ True
AlliterationCorrect("Maybel manages money well.") ➞ False
AlliterationCorrect("He helps harness happiness.") ➞ True
    نکات
- علائم نگارشی به عنوان بخشی از طول کلمه در نظر گرفته نمیشوند.
 
AlliterationCorrect("She swam to the shore.")  ➞ True
                                                                    AlliterationCorrect("Maybel manages money well.")  ➞ False
                                                                    AlliterationCorrect("He helps harness happiness.")  ➞ True
                                                                    AlliterationCorrect("There are many animals.")  ➞ False
                                                                    
                                            
نظرات