"""
Python code snippets vol 38:
188-Calculate percentage
stevepython.wordpress.com

requirements: None

source:
https://docs.python.org/3/library/string.html#module-string
"""

points = 10
total = 300
print('Percentage of points from total is: {:.2%}'.format(points/total))

#Output:
#>>>Percentage of points from total is: 3.33%
