Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to calculate the error rate given the number of errors and total samples.
Agentic_ai
error_rate = errors / [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to compute the failure rate as a percentage.
Agentic_ai
failure_rate = (failures / total_tests) * [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code to calculate the failure count from error rate and total attempts.
Agentic_ai
failure_count = [1] * total_attempts Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to create a dictionary that maps test names to their failure counts only if failures are greater than zero.
Agentic_ai
failure_dict = {test: [1] for test, failures in test_results.items() if failures [2] 0} Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to create a dictionary of failure rates for tests with failures above threshold.
Agentic_ai
failure_rates = {test: failures / [1] for test, failures in test_results.items() if failures [2] threshold and failures [3] 0} Drag options to blanks, or click blank then click option'
Attempts:
3 left
