Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Groups
Community ▾
A
A
assert len([]) > 0, "empty" is run. What happens? | StemPy Lab
Quizzes
/
assert len([]) > 0, "empty" is run. What happens?
Python Programming
Easy
High School (11–12)
High School (9–10)
Undergraduate
General
Python Going Further › Testing and Debugging
Created by
StemPy Lab
assert len([]) > 0, "empty" is run. What happens?
The program prints empty
Nothing
An AssertionError with the message empty
A ValueError
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← assert 2 + 2 == 4, "maths" is run. What is shown?
A function double(n) returns n * 3. The test self.assertEqual(double(2), 4) is run. What does the report say about the values? →
More on
Python Going Further › Testing and Debugging
Discussion (0)
Log in
to join the discussion.
Loading…
Problems on this topic
Think of a bug that you met while working through this book, or write one on purpose.
Easy
This function should give the average of a list, but gives a wrong answer for [2, 4, 6] (it gives…
Easy
A pipeline has three stages. For the input "Hello, World", it should give ["hello", "world"], but…
Medium
Write three properties that must be true for any list x and the function reversed_list(x) that…
Medium
All problems on this topic →