+ 1

How to print a number with 2 zeros after a point?

Input: a=2.5, b=4, output: c=a*b, c= 10.00

19th Mar 2020, 9:29 AM
PUFFIN Channel
PUFFIN Channel - avatar
2 Respuestas
+ 4
print(f'{42}.00')
19th Mar 2020, 9:35 AM
HonFu
HonFu - avatar