Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a test data variable holding a user's name.
Testing Fundamentals
test_user_name = [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around the string value.
✗ Incorrect
The test data for a user's name should be a string, so it must be enclosed in quotes.
2fill in blank
mediumComplete the code to add a test data entry for user age as an integer.
Testing Fundamentals
test_user_age = [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes which make the number a string.
Using a decimal number instead of an integer.
✗ Incorrect
User age should be an integer number without quotes or decimals.
3fill in blank
hardFix the error in the test data dictionary for user info.
Testing Fundamentals
test_user_info = {"name": "Bob", "age": [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the number in quotes making it a string.
Using a decimal number instead of an integer.
✗ Incorrect
The age value should be an integer without quotes to be valid test data.
4fill in blank
hardFill both blanks to create a list of test data users with names and ages.
Testing Fundamentals
test_users = [{"name": [1], "age": [2]] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using numbers as names without quotes.
Putting numbers in quotes.
✗ Incorrect
The name must be a string with quotes, and age must be an integer without quotes.
5fill in blank
hardFill all three blanks to create a test data dictionary with user, score, and active status.
Testing Fundamentals
test_data = {"user": [1], "score": [2], "active": [3] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using numbers as strings for score.
Using strings instead of booleans for active.
✗ Incorrect
User is a string, score is an integer, and active is a boolean value.