Python: “global name 'time' is not defined”

后端 未结 5 973
清酒与你
清酒与你 2020-12-29 23:28

I\'m writing a silly program in python for a friend that prints \"We are the knights who say \'Ni\'!\". then sleeps for 3 seconds, and then prints \"Ni!\" twenty times at ra

5条回答
  •  庸人自扰
    2020-12-29 23:32

    What Jerub said. I ran your exact code and it worked:

    >>> import silly
    >>> silly.knights_of_ni()
    We are the knights who say 'ni'.
    Ni!
    Ni!
    Ni!
    Ni!
    Ni!
    Ni!
    

提交回复
热议问题