Complete the code to check if the variable result equals 10 using pytest.
def test_result(): result = 10 assert result [1] 10
The == operator checks if two values are equal. Here, assert result == 10 verifies that result is exactly 10.
Complete the code to assert that value is not equal to 5.
def test_value_not_five(): value = 3 assert value [1] 5
The != operator checks that two values are not equal. Here, assert value != 5 confirms value is anything but 5.
Fix the error in the assertion to check if score is greater than or equal to 50.
def test_score(): score = 75 assert score [1] 50
The >= operator checks if the left value is greater than or equal to the right value. Here, assert score >= 50 ensures score is at least 50.
Fill both blanks to assert that temperature is less than 100 and not equal to 0.
def test_temperature(): temperature = 75 assert temperature [1] 100 and temperature [2] 0
The first blank uses < to check if temperature is less than 100. The second blank uses != to ensure it is not zero.
Fill all three blanks to create a test that asserts age is greater than 18, less than 65, and not equal to 30.
def test_age(): age = 40 assert age [1] 18 and age [2] 65 and age [3] 30
The test checks three things: age > 18, age < 65, and age != 30. This ensures age is between 19 and 64 but not 30.