Challenge: Count Keyword Occurrences
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.
Lösung
Danke für Ihr Feedback!
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Can you explain this in simpler terms?
What are the next steps I should take?
Can you provide an example?
Großartig!
Completion Rate verbessert auf 4.76
Challenge: Count Keyword Occurrences
Swipe um das Menü anzuzeigen
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.
Lösung
Danke für Ihr Feedback!
single