这个简单的If语句向我发送一个SyntaxError:Python3.6上的无效语法
我得到的错误是:这个简单的If语句向我发送一个SyntaxError:Python3.6上的无效语法,python,python-3.x,if-statement,error-handling,Python,Python 3.x,If Statement,Error Handling,我得到的错误是: elephant_weight = 3000 ant_weight = 0.1 If elephant_weight > ant_weight: square() 正确的语法是(注意小写的if): Python区分大小写。使用if而不是if。在下一行中的缩进量看起来也不合适 File "c:/Users/AIRWEBDEV/Documents/exercice.py", line 37 If elephant_weight > ant_weight:
elephant_weight = 3000
ant_weight = 0.1
If elephant_weight > ant_weight:
square()
正确的语法是(注意小写的if
):
Python区分大小写。使用
if
而不是if
。在下一行中的缩进量看起来也不合适
File "c:/Users/AIRWEBDEV/Documents/exercice.py", line 37
If elephant_weight > ant_weight:
^
SyntaxError: invalid syntax
if elephant_weight > ant_weight:
square()