+ 1

Still stuck at the if statement part..i keep getting syntax error: invalid syntax for typing this..

x= int(input("Scores")) if x==20: print("good") else: print("bad") print("program ended") Is there any error in this code? and help me check the indent too.Thanks

5th Jul 2019, 11:28 AM
Ayo Ashaolu
Ayo Ashaolu - avatar
6 Antworten
+ 1
This program works perfectly. If you could share your actual code, we might be able to help you find your problem
5th Jul 2019, 11:31 AM
Airree
Airree - avatar
+ 1
Thats the actual code..python
5th Jul 2019, 11:33 AM
Ayo Ashaolu
Ayo Ashaolu - avatar
+ 1
But it works.. At least can you tell me what the error message is or what line is it on?
5th Jul 2019, 11:34 AM
Airree
Airree - avatar
+ 1
The error is on that print(program ended) line.. i am typing it on console.. How will the output look like
5th Jul 2019, 11:41 AM
Ayo Ashaolu
Ayo Ashaolu - avatar