Jump to content

Python: Difference between revisions

56 bytes added ,  18 April 2023
 
Line 67: Line 67:
# Format to two decimal places
# Format to two decimal places
print(f"Accuracy: {accuracy:.02f}%")
print(f"Accuracy: {accuracy:.02f}%")
# Format an int to 2 digits
print(f"Size: {size:02}%")
</syntaxhighlight>
</syntaxhighlight>