+ 2

Can somebody explain this syntax error on my code for me?

I need some help with python https://code.sololearn.com/csnCriLU8QAK/?ref=app

22nd Aug 2019, 10:29 PM
Ethan
Ethan - avatar
9 Réponses
22nd Aug 2019, 10:36 PM
Ethan
Ethan - avatar
+ 2
ok thanks
22nd Aug 2019, 10:36 PM
Ethan
Ethan - avatar
+ 2
so when ever its a if or else statement it needs colons?
22nd Aug 2019, 10:37 PM
Ethan
Ethan - avatar
+ 2
ok
22nd Aug 2019, 10:38 PM
Ethan
Ethan - avatar
+ 2
i will make sure to do the lesson
22nd Aug 2019, 10:39 PM
Ethan
Ethan - avatar
+ 2
i recreated it and it works thanks for the help
22nd Aug 2019, 10:41 PM
Ethan
Ethan - avatar
+ 1
#No colons #No tabs x = 17 if x > 8: print('17 is greater then 8') if x-8 == 1: print('17- 8 equals 1!') else: print('17-8 does not equal 1')
22nd Aug 2019, 10:36 PM
Steven M
Steven M - avatar
0
You forgot the colon ( : ) in your if statement
24th Aug 2019, 8:06 PM
Aryan Abdolahi Serajzadeh
Aryan Abdolahi Serajzadeh - avatar