Programming Practice
T

Tracing, Debugging and Handling Strings and Files

Push a bit harder. Apply what you know to less familiar problems.

Computer Science · Medium

5

questions · ~4 min · 3 hints each (−5 pts)

Confidence tracking, 3-tier hints and instant feedback.

What you'll learn

Each question helps you build key knowledge and skills.

  • 1When tracing programs with loops, update a trace table on every pass through the loop, including the loop counter and any variables that change.
  • 2String handling involves methods such as slicing, concatenation, upper(), lower(), len() and find() to manipulate text stored in a program.
  • 3File handling in Python typically uses open(), read(), write() and close(), and files should always be closed after use to avoid data loss.
  • 4Good testing uses normal, boundary and erroneous data to check a program works correctly and rejects invalid input using validation checks like range checks and presence checks.

Question mix

A mix of question types to build your skills.

  • Short answer×3
  • Multiple choice×2

Different question types help you think in different ways.

How it works

A simple 3-step process

  1. 1

    Rate your confidence

    Tell us how sure you feel before answering. It helps us understand your starting point.

  2. 2

    Use hints if stuck

    Get up to 3 helpful hints per question. Each hint costs 5 Treasure Points.

  3. 3

    See what went wrong

    Get instant feedback with clear explanations, so you can learn and improve.

Ready when you are

This takes about 4 minutes.