0

Print error

print("2" + "2") print(1 + '2 + 3 + '4') There is an error in second line, however, the output should print the first line,.ie., 22. is there something that I'm missing?

13th May 2018, 12:23 PM
Sreenidhi
Sreenidhi - avatar
5 ответов
+ 3
yes:: print(1+'2+3+'4') you opened a quote before the 2 as '2 and never closed it
13th May 2018, 12:28 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 1
You're missing ' mark in your second print statement.
13th May 2018, 12:29 PM
Rahul George
Rahul George - avatar
13th May 2018, 12:34 PM
Rahul George
Rahul George - avatar
0
true, shouldn't the output for first print statement be executed though?
13th May 2018, 12:31 PM
Sreenidhi
Sreenidhi - avatar
0
yeah cool! I expected it to interpret the first line and print and then throw error only for the second line! thanks guys!
13th May 2018, 12:48 PM
Sreenidhi
Sreenidhi - avatar