0
0
Testing Fundamentalstesting~10 mins

Cost of bugs at different stages in Testing Fundamentals - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to print the stage where bug fixing is cheapest.

Testing Fundamentals
print('Bug fixing is cheapest during the [1] stage.')
Drag options to blanks, or click blank then click option'
Arequirements
Bdeployment
Cproduction
Dmaintenance
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'production' or 'deployment' because bugs are found there, but fixing is more expensive then.
2fill in blank
medium

Complete the sentence to show where bug fixing cost increases significantly.

Testing Fundamentals
Bug fixing cost increases significantly during the [1] phase.
Drag options to blanks, or click blank then click option'
Adesign
Brequirements
Ctesting
Ddeployment
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'design' because it is before coding, but cost is lower there.
3fill in blank
hard

Fix the error in the code to correctly calculate bug fixing cost multiplier.

Testing Fundamentals
cost_multiplier = 1 if stage == 'requirements' else [1]
Drag options to blanks, or click blank then click option'
A'10'
B10
Cten
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string '10' instead of number 10 causes type errors.
4fill in blank
hard

Fill both blanks to create a dictionary mapping stages to bug fixing costs.

Testing Fundamentals
bug_costs = {'requirements': 1, [1]: 10, [2]: 100}
Drag options to blanks, or click blank then click option'
A'testing'
B'deployment'
C'production'
D'design'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'deployment' instead of 'production' for the highest cost.
5fill in blank
hard

Fill all three blanks to complete the function that returns bug fixing cost multiplier by stage.

Testing Fundamentals
def get_bug_cost(stage):
    return [1].get(stage, [2]) * [3]

costs = {'requirements': 1, 'testing': 10, 'production': 100}
Drag options to blanks, or click blank then click option'
Acosts
B1
C2
Dcosts.get(stage)
Attempts:
3 left
💡 Hint
Common Mistakes
Using costs.get(stage) inside return without default causes errors if stage missing.