adplus-dvertising
frame-decoration

Question

What is the output of the code shown?
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’

Posted under Python

Answer: (d).‘3.345679 | 3.345679e+00 | 3.34568’

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the code shown?