$ ./guess_the_languageProblem Solving — fix the bug
Problem Solving — fix the bug · easy · #201

Which fix removes the bug?

x = 7
if x > 0 and < 10:
    print('digit')
  1. Replace and with && here
  2. Wrap the test in brackets
  3. Repeat x: x > 0 and x < 10
  4. Change < to <= in the test
Each side of and must be a full comparison; Python also allows 0 < x < 10.
Play Problem Solving ▸