Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

The output of the two codes shown below is the same.
i. ‘{0:.2f}’.format(1/3.0)
ii. ‘%.2f’%(1/3.0)

The output of the two codes shown below is the same.
i. ‘{0:.2f}’.format(1/3.0)
ii. ‘%.2f’%(1/3.0)
a) True
b) False

Answer: a
Explanation: The two codes shown above represent the same operation but in different formats. The output of both of these functions is: ‘0.33’. Hence the statement is true.

Join The Discussion