Problems

Available practice problems

#3Fix the BugFree

Using = instead of == in a condition

easyfunctions
#7Fix the BugPremium

*args used incorrectly

hardfunctions
#21Fix the BugFree

Calling a function before defining it

easyfunctions
#40Fix the BugFree

Missing Colon in for Loop

easyloops
#45Fix the BugFree

Wrong quote type breaks the string

easystrings
#47Fix the BugFree

Missing colon after function definition

easyfunctions
#72Fix the BugPremium

Calling a method that doesn't exist

hardstrings
#73Fix the BugPremium

Recursion with a base case that's never reached

hardrecursion
#75Fix the BugFree

Looping one step too far

easylists
#76Fix the BugFree

Converting text that isn't a number

easyfunctions
#77Fix the BugFree

Mixing text and numbers in print

easystrings
#80Fix the BugFree

Calling a function with too few arguments

mediumfunctions
#81Fix the BugPremium

Decorator swallows the arguments

hardfunctions
#84Fix the BugFree

Using = instead of == in a check

easyfunctions
#85Fix the BugFree

Wrong syntax for adding a new key

easydictionaries
#86Fix the BugPremium

Trying to index into a set

hardsets
#88Fix the BugFree

Trying to modify a tuple

easytuples
#90Fix the BugPremium

Class method missing cls

hardoop
#105Fix the BugFree

Inconsistent indentation

easyfunctions
#107Fix the BugFree

Modifying a variable before it's assigned locally

mediumfunctions
#112Fix the BugFree

Deleting a key that doesn't exist

easydictionaries
#124Fix the BugFree

Wrong function to find list length

easylists
#153Fix the BugFree

Missing indentation after if

easystrings
#155Fix the BugFree

Accessing a missing dictionary key

mediumdictionaries

Python Practice Problems – Frequently Asked Questions

Everything you need to know about practicing Python with PyDebug's bug-fixing and output-prediction challenges.

What kinds of Python problems are available?

PyDebug offers two main formats: bug-fixing problems, where broken Python code is shown and you must find and fix the error, and output-prediction questions, where you predict what a given snippet will print. Both train real debugging and code-reading skills.

How do I filter problems by difficulty or topic?

Use the filters at the top of this page. You can filter by difficulty (easy, medium, hard), by topic (variables, loops, functions, lists, dictionaries, OOP, recursion, exceptions, and more), and by access level — free or premium problems.

I am a beginner — where should I start?

Start with easy problems in topics you already know, like variables, strings, and lists. As you solve them, you earn XP and build a daily streak. When you are comfortable, move to medium and hard problems, or try the common Python errors guide to learn what each error means.

Do I need an account to solve problems?

No. Guest mode lets you solve up to 5 problems per day without signing up. Creating a free account unlocks unlimited daily solves, saves your progress, tracks your XP and streak, and lets you appear on the leaderboard.

How do hints and XP work?

Each correct first-time solve earns XP. If you get stuck, hints can guide you toward the answer. Every hint on every problem is free for signed-in learners — one click each, no tasks and no ads. Your streak grows by one for every consecutive day you solve at least one problem.

Are these problems useful for interview preparation?

Yes. Bug-fixing and output-prediction questions appear frequently in Python interviews. Practicing them improves your ability to read code quickly, spot off-by-one errors, understand scope and mutability, and explain what a program does — exactly what interviewers test.