How to print percentage from two numbers using format in Python

1 Answer

0 votes
print('{:.2%}'.format(16/32))
print('{:.2%}'.format(32/16))
print('{:.2%}'.format(15/32))

 
'''
run:
 
50.00%
200.00%
46.88%
  
'''

 



answered Jul 29, 2019 by avibootz
...