Awesome!
Completion rate improved to 4.76Section 1. Chapter 7
single
Challenge: Count Keyword Occurrences
Swipe to show menu
Task
Swipe to start coding
You are given a text and a search keyword. Your program must:
-
Count how many times the keyword appears in the text (non-overlapping matches).
-
Find the index of the first occurrence.
-
Find the index of the last occurrence.
-
Print results in a clear, consistent format.
The search must be case-insensitive.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 7
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat