Computer Science, asked by xevo382, 10 months ago

print "10+20" will be display
(i) 20+10
(ii) 10+20
(iii) 30​

Answers

Answered by Equestriadash
3

print "10 + 20" will display (ii) 10 + 20.

Any value placed in quotes will be treated as a string value.

Since here 10 + 20 has been placed in quotes, the same has been printed as the output.

However, if the statement given was print 10 + 20, the output would be 30 as it isn't placed in quotes and are therefore treated as numerical values.

It could also result in an error depending upon the version of Python used. Older versions need not require brackets for the print syntax, whereas newer versions do.

The statement, therefore, would look something like: print("10 + 20").

Similar questions