Complete the code to print a message when a test fails.
if test_result == [1]: print("Test failed! Please fix the bug.")
The test result should be compared to "fail" to detect a failure and print the message.
Complete the code to check if a bug is costly before reporting.
if bug_severity [1] 5: report_bug()
We report bugs with severity greater than 5 because they are costly.
Fix the error in the assertion to check if the function output is correct.
assert [1] == expected_output, "Output mismatch!"
The assertion compares the actual result to the expected output to detect errors.
Fill both blanks to create a test that checks if a number is positive and less than 100.
if number [1] 0 and number [2] 100: print("Valid number")
The number must be greater than 0 and less than 100 to be valid.
Fill all three blanks to create a dictionary comprehension that maps words to their lengths if length is greater than 3.
lengths = { [1]: [2] for [1] in words if len([1]) [3] 3 }The comprehension uses 'word' as key, 'len(word)' as value, and filters words longer than 3 characters.