Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Slicing and Search Drills | Strings
Data Types in Python

bookChallenge: 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:

  1. name_clean β€” remove extra spaces from full_name.
  2. has_quick β€” check if "quick" appears in sentence (case-insensitive).
  3. inside_parens β€” extract text between parentheses ( and ).
  4. o_count β€” count how many 'o' letters are in sentence (case-insensitive).
  5. domain β€” from email, take everything after @ (after trimming and lowercasing).
  6. report β€” build "Name | Domain | Count" using an f-string and SEP.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 6
single

single

Ask AI

expand

Ask AI

ChatGPT

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?

close

Awesome!

Completion rate improved to 3.45

bookChallenge: 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:

  1. name_clean β€” remove extra spaces from full_name.
  2. has_quick β€” check if "quick" appears in sentence (case-insensitive).
  3. inside_parens β€” extract text between parentheses ( and ).
  4. o_count β€” count how many 'o' letters are in sentence (case-insensitive).
  5. domain β€” from email, take everything after @ (after trimming and lowercasing).
  6. report β€” build "Name | Domain | Count" using an f-string and SEP.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 6
single

single

some-alt