Complete the code to check if a new record was successfully created.
assert response.status_code == [1]The HTTP status code 201 means the resource was successfully created.
Complete the code to verify that the update operation changed the record's name.
assert updated_record.[1] == 'New Name'
We check the name attribute to confirm the update.
Fix the error in the code that verifies deletion by checking the record count.
assert len(records) [1] initial_count - 1
After deletion, the number of records should be exactly one less, so we use ==.
Fill both blanks to create a dictionary comprehension that maps user IDs to emails for active users only.
{user.[1]: user.[2] for user in users if user.active}The dictionary keys are user IDs and values are emails for active users.
Fill all three blanks to filter records with score above 50 and create a dictionary of names to scores.
result = {record.[1]: record.[2] for record in records if record.[3] > 50}We map names to scores and filter where score is greater than 50.