CBSE Class 11 Informatics Practices Question 50 of 62

Getting Started with Python — Question 18

Back to all questions
18
Question

Question 18

Record what happens when the following statements are executed:

(a) print (n = 17)

(b) print (8+9)

(c) print (4.2, "hello", 6-2, "world", 15/2.0)

Answer

(a) It raises TypeError as 'n' is an invalid keyword argument for print() function.

(b) 17

(c) 4.2 hello 4 world 7.5