我正在做一个python项目,我需要在屏幕上打印规则。我使用的是simplegui模块,这里是我所拥有的。你知道吗
text = """You will be given a number
and a number of operations. The number
on the top is the answer to the problem.
You must fill the blanks with numbers that
make the answer. Hit enter when you are
done, hit delete to go back."""
canvas.draw_text(text, (150, 250), 30, 'white')
它给了我一个错误:
ValueError: text may not contain non-printing characters
如何修复此错误?你知道吗
draw_text()
函数不能绘制多行。你必须一行一行地画。你知道吗但是…我写了一个函数来画多行: ^{}
必须导入^{} 模块,因为它不是CodeSkulptor的函数。你知道吗
另请阅读SimpleGUICS2Pygame文档中的Tips部分。你知道吗
相关问题 更多 >
编程相关推荐