79643753

Date: 2025-05-29 10:45:00
Score: 1.5
Natty:
Report link

Outside of a for-loop, x in range(..) mean something different. It's a test that returns a boolean

print(1 in range(1,11)) # prints True

So your while-loop actually means this:

def main():
  x=1;

while True if x in range(1,11) else False:
     print (str(x)+" cm");


if __name__=="__main__":
    main();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: argh