嗨,我对Python很陌生,但以前用其他基于C的语言编程。我一直遇到语法错误,但我无法弄清楚它的含义。
x = 1
Primary = 0
Secondary = 0
while x != 0:
Primary + 1
while Secondary <= Primary
Ed.PlayBeep()
Secondary + 1
Secondary = 0
答案 0 :(得分:2)
添加:
:
while Secondary <= Primary:
...
另外,您的意思是Primary += 1
和Secondary += 1
吗?您正在递增这些值但不指定它们。
答案 1 :(得分:0)
你在第二次丢失冒号,它应该去:
while Secondary <= Primary: