我使用processing.py的Python for循环
我在下面这个啧啧(JAVA)
https://www.youtube.com/watch?v=H7frvcAHXps
,我想知道如果我可以使用相同类型的单行环在python
for(int y = 0; y < height; y = y + cellSize):
for(int x = 0; x < width; x = x + cellSize):
rect(x, 0, cellSize, cellSize)
我收到一个错误,当我尝试运行代码:
processing.app.SketchException: Maybe there's an unclosed paren or quote mark somewhere before this line?
我想有在python
嗨,欢迎来到SO,'for'循环在Python中不起作用。请检查基本教程,如https://wiki.python.org/moin/ForLoop –
您也遗漏了'public static void main'位。 –