+ 1
what is happening in the last line,how is %0.3f is replacing both values?
num = 8 num_sqrt = num ** 0.5 print('The square root of %0.3f is %0.3f'%(num ,num_sqrt))
3 Answers
+ 3
You can completely take out the 0.3 because it means nothing. The %f is acting as a placeholder for values that are to be added. f stands for format, so you are formatting the values num and num_sqrt into the printed string in the order they are listed
+ 2
Absolutely partha
+ 1
thanks Peter C...