I'm having problem calculating various percentages of text in a text file. Below are my codes. Will appreciate any help, thanks.
Code:
def pecent (pento):
pento = x/100 * filename
text = open ("C:\\fname.txt", 'r')
filename = text.split()
x = [10, 20, 30, 40, 50, 60, 70, 80, 90]
for z in x:
print pento
Comment