0
Python "if" problem....help me pleeease
print('Hello, World!') a=7 if a>6 print("right") SyntaxError at line 3 of your code: invalid syntax I don't know anything wrong , can anyone tell me whats wrong with my code, please
3 Respostas
+ 3
There always needs to be a ":" at the end of if statements.
ex:
a = 3
if a == 3:
print("yes")
print("bye")
# output
yes
bye
0
Thank you very much ..i try many times
0
There is a syntax error in your code in line 3 i.e the "if a>6". A double column(:) should follow right after that and if you would like to make it a little 'stuff stuff', you can add an else statement idented as the if block