看例子:
from visual import *
def hello():
newyear=2010
sphere()
return newyear
我的问题是当我调用函数 hello() 时,会出现一个球体显示窗口,并且还会打印 2010,但是如果我关闭显示窗口,程序就会终止。这不是我想要的,我该如何避免呢?
另外,在我的代码中,我也会使用 newyear,比如 b=hello(),但是当我想使用 newyear 时,我不希望它显示球体,我该怎么做?
提前致谢!