0

I'm not able to write print ("program ended")....the second ones

I'm not able to write print ("program ended")....the second ones after if 5<10 print ("10 is greater than 5") .......it gives the error of invalid syntax exact statement: if 10>5 : print("10 is greater than 5") print ("abc")

31st Mar 2017, 8:23 AM
Nipun Grover
Nipun Grover - avatar
2 Answers
+ 1
There is nothing wrong in that code if 10>5: print("10 is greater that 5") print("abc") Just make sure you are using python3 not python2 In case you are using python2 , use print wothout parentheses.
31st Mar 2017, 8:31 AM
Moataz El-Ibiary
Moataz El-Ibiary - avatar
0
A litle trick here, add on top this line. from __future__ import print_function
31st Mar 2017, 10:25 AM
nextco
nextco - avatar