Challenge: Slicing and Search Drills
Task
Swipe to start coding
Use simple string tools β methods, slicing, in, and f-strings β to complete each expression.
All variables are already defined β do not change them.
Compute:
name_cleanβ remove extra spaces fromfull_name.has_quickβ check if"quick"appears insentence(case-insensitive).inside_parensβ extract text between parentheses(and).o_countβ count how many'o'letters are insentence(case-insensitive).domainβ fromemail, take everything after@(after trimming and lowercasing).reportβ build"Name | Domain | Count"using an f-string andSEP.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 6
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 the main points I should remember?
Can you give me an example?
Awesome!
Completion rate improved to 3.45
Challenge: Slicing and Search Drills
Swipe to show menu
Task
Swipe to start coding
Use simple string tools β methods, slicing, in, and f-strings β to complete each expression.
All variables are already defined β do not change them.
Compute:
name_cleanβ remove extra spaces fromfull_name.has_quickβ check if"quick"appears insentence(case-insensitive).inside_parensβ extract text between parentheses(and).o_countβ count how many'o'letters are insentence(case-insensitive).domainβ fromemail, take everything after@(after trimming and lowercasing).reportβ build"Name | Domain | Count"using an f-string andSEP.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 6
single