Which stage typically incurs the highest cost to fix a software bug?
Think about how much effort it takes to fix a bug after users start using the software.
Bugs found after release are the most expensive to fix because they may require patches, customer support, and can damage reputation.
Compared to fixing bugs during coding, fixing bugs found during testing is usually:
Consider how many parts of the software might be affected by the time testing happens.
Bugs found during testing often require more effort to fix because they may affect multiple modules and require regression testing.
What is the output of the following Python code that calculates cost multipliers for fixing bugs at different stages?
stages = ['Requirements', 'Design', 'Coding', 'Testing', 'Production'] cost_multipliers = [1, 5, 10, 20, 100] for stage, cost in zip(stages, cost_multipliers): print(f"{stage}: ${cost * 100}")
Check the multiplication of cost multipliers by 100 and the print format.
The code multiplies each cost multiplier by 100 and prints the stage with the calculated cost.
Which assertion correctly verifies that the cost to fix a bug in production is at least 10 times the cost in coding?
cost_coding = 1000 cost_production = 12000
Think about which cost should be larger and by what factor.
The assertion checks that production cost is at least 10 times coding cost, which matches the data.
What error does the following code raise when calculating bug fix costs?
costs = {'requirements': 1, 'design': 5, 'coding': 10, 'testing': 20, 'production': 100}
for stage in ['requirements', 'design', 'coding', 'testing', 'deployment']:
print(f"{stage}: ${costs[stage] * 100}")Check if all stages in the list exist as keys in the dictionary.
The key 'deployment' is not defined in the costs dictionary, causing a KeyError.