Challenge: Parse and Summarize Log Data
Task
Swipe to start coding
Given a multiline string representing a system log, your task is to process the log and generate a summary report.
- Extract all lines from the log that contain the word "ERROR".
- Count how many times "ERROR", "WARNING", and "INFO" appear in the log.
- Return a tuple containing the counts for "ERROR", "WARNING", "INFO", and a list of the extracted error lines.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 3
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain this in simpler terms?
What are some examples related to this topic?
How does this information apply to real-world situations?
Awesome!
Completion rate improved to 4.76
Challenge: Parse and Summarize Log Data
Swipe to show menu
Task
Swipe to start coding
Given a multiline string representing a system log, your task is to process the log and generate a summary report.
- Extract all lines from the log that contain the word "ERROR".
- Count how many times "ERROR", "WARNING", and "INFO" appear in the log.
- Return a tuple containing the counts for "ERROR", "WARNING", "INFO", and a list of the extracted error lines.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 3
single