Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Groups
Community ▾
A
A
Problems
/
Python Going Further
/
Testing and Debugging
Testing and Debugging
Python Programming
+ Upload a Problem
More in Python Going Further
Classes and Objects
Inheritance and Special Methods
Files and Data Formats
Comprehensions, Iterators and Generators
Data Structures
Testing and Debugging
All Levels
High School (9–10)
High School (11–12)
Undergraduate
General
All
Easy
Medium
Sort
Mixed
Newest first
Oldest first
A to Z
10 problems
Type:
Any
Conceptual
Python-Coded
1.
Think of a bug that you met while working through this book, or write one on purpose.
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Easy
2.
This function should give the average of a list, but gives a wrong answer for [2, 4, 6] (it gives…
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Easy
3.
A pipeline has three stages. For the input "Hello, World", it should give ["hello", "world"], but…
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Medium
4.
Write three properties that must be true for any list x and the function reversed_list(x) that…
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Medium
5.
Fix second_largest so that it gives the second largest different value, and None when there is none.
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Medium
6.
A function longest_word(text) gives the longest word of a text, and when two words are equally…
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Easy
7.
A test run prints this. How many tests passed?
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Medium
8.
A student writes these names for test methods in a class that tests a Stack class.
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Easy
9.
A function ticket_price(age) gives 0 for ages under 5, 50 for ages 5 to 12, 100 for ages 13 to 59…
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Easy
10.
A function is_even(n) should say whether a whole number is even.
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
StemPy Lab
Easy