【发布时间】:2020-01-17 17:13:50
【问题描述】:
elephant_weight = 3000
ant_weight = 0.1
If elephant_weight > ant_weight:
square()
我得到的错误是:
File "c:/Users/AIRWEBDEV/Documents/exercice.py", line 37
If elephant_weight > ant_weight:
^
SyntaxError: invalid syntax
【问题讨论】:
-
Python 区分大小写。使用
if而不是If。 -
以下行中的缩进量看起来也不合适
标签: python python-3.x if-statement error-handling