3 thoughts on “Udacity – Intro to Computer Science – Python – Crypto Analysis – Letter Frequency”
That’s Good
you help us
thanks
wow, bravo!
See below code, i think its much better to understand and outputs the same required result.
def freq_analysis(message):
alpha = ‘abcdefghijklmnopqrstuvwxyz’
freq=[]
for i in range(0,26):
counter=float(message.count(alpha[i])/len(message))
freq.append(counter)
return freq
That’s Good
you help us
thanks
wow, bravo!
See below code, i think its much better to understand and outputs the same required result.
def freq_analysis(message):
alpha = ‘abcdefghijklmnopqrstuvwxyz’
freq=[]
for i in range(0,26):
counter=float(message.count(alpha[i])/len(message))
freq.append(counter)
return freq