Test Series - python

Test Number 12/108

Q: The output of which of the codes shown below will be: “There are 4 blue birds.”?
A. ‘There are %g %d birds.’ %4 %blue
B. ‘There are %d %s birds.’ %(4, blue)
C. ‘There are %s %d birds.’ %[4, blue]
D. ‘There are %d %s birds.’ 4, blue
Solution: The code ‘There are %d %s birds.’ %(4, blue) results in the output: There are 4 blue birds. When we insert more than one value, we should group the values on the right in a tuple.

You Have Score    /1