Skip to content
Middle School Python
NY-CSDF.6-8.CT.7

Solve multi-step string window and marker problems

Solve multi-step string problems with slices, windows, prefix/suffix checks, and deliberate normalization.

Learn the skill

  1. 1Solve multi-step string problems with slices, windows, prefix/suffix checks, and deliberate normalization.
  2. 2Test empty, short, exact-length, overlapping, and no-match cases.

Cited instruction

Use the publisher's material for instruction, then return to PeerTutor for the checked practice written for this skill.

Computer Science and Digital Fluency · New York State Education Department

Practice preview

What does count_hi("hihihi") return? def count_hi(s): return s.count("hi")

What does repeat_front("Python", 3) return? def repeat_front(s, n): return s[:n] * n

What does remove_char("code", 1) return? def remove_char(s, n): return s[:n] + s[n + 1:]

Open adaptive practice

Course mapping reviewed by Nikhil on 2026-08-26. Practice is authored for PeerTutor and does not reproduce linked providers' exercises.

Solve multi-step string window and marker problems practice · PeerTutor