Change 200 to 404. What will the program print?
status = 200
print(status == 200) Line notes
- Store a service response code.
- Compare the code with 200 and print the result.
Question 2 of 5
The helper correctly displays a prepared retry delay. When connected to a client, it encounters timeouts and received responses with unsupported values.
Imagine two empty search screens. In one case the service returned an empty list in a successful response. In the other, the connection dropped before any response arrived. “No matches” makes sense on the first screen. On the second, the app still has no way to tell whether matches exist.
WHERE TO START
What would you check first if the service returned an empty response?
Change 200 to 404. What will the program print?
status = 200
print(status == 200)