Examveda

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: Option D


This Question Belongs to Python Program >> Formatting And Decorators

Join The Discussion

Related Questions on Formatting and Decorators