以下if语句语法正确的是()。
A.if(x〉0)print(x)Elseprint(-x)
B.Ifx〉0print(x)elseprint(-x)
C.ifx〉0:Print(x)Elseprint(-x)
D.ifx〉0:Print(x)else:print(-x)
正确答案:D
猜你喜欢