saving . . . saved Pring has been deleted. Pring has been hidden .
Pring
Title
Question
<span style="color: rgb(37, 37, 37); font-family: sans-serif; font-size: 14px;">print('The value of x is %3.2f' %x)</span>
<span style="color: rgb(37, 37, 37); font-family: sans-serif; font-size: 14px;">
</span>
<span style="color: rgb(37, 37, 37); font-family: sans-serif; font-size: 14px;">What does 3 represent</span>

Python-3.4.3 Input-output 03-04 min 10-20 sec 06-05-20, 1:11 p.m. Praylin

Answers:

The 3 represents the length of the complete formatted string, in case the length of the value of x is less than 3 it will be padded with empty spaces.
06-05-20, 11 p.m. ankitrj.iitb
Then for %3.4f 
The value of x is 1.5679. The total no. of digits is not 3
23-09-20, 10:48 p.m. vasubisht.bisht@gmail.com

Login to add comment


Log-in to answer to this question.