PATCH//NOTES Open it in the app
← All hands-on practice
Python · 8 min

Not that word

status is down. differ.py asks if it is not down, which it is, so the else runs. Change the test so it asks if status is not up.

Start it: free, in your browser, no account

What you will do

  1. Read differ.py.
  2. Run differ.py. It prints same.
  3. Change the test so it asks if status is not up.
  4. Run differ.py again. It prints changed.

This stop adds if name != "text":. else: can sit under it. No and, and no elif.