fork download
  1. def find():
  2. x = 0
  3. while True:
  4. exec(f'a = {x}')
  5. exec(f'b = {x}')
  6. if a is not b:
  7. print('STOP ITERATION')
  8. print(f'Answer: {x}')
  9. break
  10. x += 1
  11.  
  12. find()
Runtime error #stdin #stdout #stderr 0.16s 23568KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 12, in <module>
  File "./prog.py", line 6, in find
NameError: name 'a' is not defined