语法erro:无效的语法

时间:2019-09-11 04:25:07

标签: python python-3.x

我在“如果条件”中遇到语法错误。如果你们能帮助我,我会很感激。对不起,我的英语不好,我是巴西人。

我已经尝试更改“。”到“,”,但我没有成功。

elif(salario > 1751.82 and <= 2919.72):

'''print(desconto4)

SyntaxEror: invalid syntax.

1 个答案:

答案 0 :(得分:2)

salario > 1751.82 and <= 2919.72

这是无效的if / elif条件。

显式编写和连接2个条件:

elif salario > 1751.82 and salario <= 2919.72:

或链接条件:

elif 1751.82 < salario <= 2919.72:

没有看到代码的其他部分,我不知道您的代码中是否还有其他错误。