Jump to content

Python: Difference between revisions

69 bytes added ,  27 December 2021
Line 64: Line 64:
print('Hello {}! This is {}.'.format(name, program))
print('Hello {}! This is {}.'.format(name, program))
print('Hello {name}! This is {program}.'.format(name=name, program=program))
print('Hello {name}! This is {program}.'.format(name=name, program=program))
# Format to two decimal places
print(f"Accuracy: {accuracy:.02f}%")
</syntaxhighlight>
</syntaxhighlight>