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.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Can you explain this in simpler terms?
What are the next steps I should take?
Can you provide an example?
Чудово!
Completion показник покращився до 4.76
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.
Рішення
Дякуємо за ваш відгук!
single