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.
Solução
Obrigado pelo seu feedback!
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 4.76
Challenge: Count Keyword Occurrences
Deslize para mostrar o menu
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.
Solução
Obrigado pelo seu feedback!
single