Wie man Prozentsatz in Python bekommt
def percentage(part, whole):
return 100 * float(part)/float(whole)
print(percentage(5, 7))
# If you want to limit the number of decimal to 2, change the number in {:.2f} as you wish;
print('{:.2f}'.format(percentage(5, 7)))
Intempestive Al Dente