fork download
  1. from datetime import datetime
  2. def monthx():
  3. MO = now.strftime("%m")
  4. if MO == 12:
  5. q = "Грудень"
  6. return q
  7. else:
  8. if MO == 11:
  9. q = "Листопад"
  10. return q
  11.  
  12. print(monthx())
Runtime error #stdin #stdout #stderr 0.14s 26300KB
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 3, in monthx
NameError: name 'now' is not defined