Complete the code to name the initial state of a defect after it is found.
defect_state = "[1]" # Initial state when a defect is found
The initial state of a defect after it is found is called Open.
Complete the code to show the state when a defect is fixed by developers.
defect_state = "[1]" # State after defect is fixed
When developers fix a defect, its state changes to Fixed.
Fix the error in the code to represent the state when a defect is not accepted.
defect_state = "[1]" # State when defect is invalid or not accepted
A defect that is invalid or not accepted is marked as Rejected.
Fill both blanks to complete the defect lifecycle transition code.
if defect_state == "Open": defect_state = "[1]" # Developer fixes the defect elif defect_state == "[2]": defect_state = "Closed" # Tester closes after retest
After 'Open', the defect moves to 'Fixed' when developers fix it. Then from 'Fixed' (tester retesting), it can move to 'Closed' if retest passes.
Fill all three blanks to complete the defect lifecycle dictionary comprehension filtering defects by state.
defects = {id: state for id, state in defect_list.items() if state == "[1]" or state == "[2]" or state == "[3]"}This code filters defects that are either 'Open', 'Fixed', or 'Closed' states, which are common active or resolved states in the lifecycle.