0
0
Testing Fundamentalstesting~10 mins

Test progress reporting 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 test progress percentage.

Testing Fundamentals
total_tests = 50
completed_tests = 20
progress = (completed_tests [1] total_tests) * 100
print(f"Progress: {progress}%")
Drag options to blanks, or click blank then click option'
A*
B/
C+
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using multiplication instead of division causes wrong progress calculation.
Adding or subtracting numbers instead of dividing.
2fill in blank
medium

Complete the code to update the progress bar width based on test progress.

Testing Fundamentals
progress_percent = 75
progress_bar_style = f"width: [1]%"
print(progress_bar_style)
Drag options to blanks, or click blank then click option'
Aprogress
Bcompleted_tests
Ctotal_tests
Dprogress_percent
Attempts:
3 left
💡 Hint
Common Mistakes
Using variables that do not represent percentage causes wrong style.
Forgetting to include the percent sign in the style string.
3fill in blank
hard

Fix the error in the code that calculates and prints test progress.

Testing Fundamentals
total = 40
completed = 10
progress = completed [1] total * 100
print(f"Test progress: {progress}%")
Drag options to blanks, or click blank then click option'
A/
B*
C+
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using multiplication instead of division.
Using addition or subtraction which gives wrong results.
4fill in blank
hard

Fill both blanks to create a dictionary showing test names and their pass status.

Testing Fundamentals
tests = ['login', 'signup', 'checkout']
results = [True, False, True]
status = {tests[1]: results[2] for i in range(len(tests))}
print(status)
Drag options to blanks, or click blank then click option'
A[i]
B(i)
Attempts:
3 left
💡 Hint
Common Mistakes
Using parentheses instead of square brackets causes errors.
Mixing up the index variable or forgetting brackets.
5fill in blank
hard

Fill all three blanks to filter tests that passed and create a summary dictionary.

Testing Fundamentals
tests = ['login', 'signup', 'checkout', 'profile']
results = [True, False, True, False]
summary = {tests[1]: results[2] for i in range(len(tests)) if results[i][3]
print(summary)
Drag options to blanks, or click blank then click option'
A[i]
D== True
Attempts:
3 left
💡 Hint
Common Mistakes
Using parentheses instead of square brackets for list access.
Forgetting to compare result to True in the if condition.