Vidyalelo
Python · Q45

Formatting and Decorators

Programming · Python · question 45

Q45

What will be the output of the following Python code snippet? x=3.3456789 '%f | %e | %g' %(x, x, x)

A.
Error
B.
'3.3456789 | 3.3456789+00 | 3.345678'
C.
'3.345678 | 3.345678e+0 | 3.345678'
D.
'3.345679 | 3.345679e+00 | 3.34568'
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board