Advertisement
niharsarangi

Bullshit meter

Mar 21st, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.85 KB | None | 0 0
  1. def bullshit(word, decode_list):
  2.     count=0
  3.     word=word.lower()
  4.     for letter in word:
  5.         if(not letter.isspace()):
  6.             count=count+decode_list.index(letter)
  7.  
  8.  
  9.     return count
  10.  
  11.  
  12. def main():
  13.     decode_list=['','a','b','c','d','e','f','g','h',
  14.              'i','j','k','l','m','n','o','p','q',
  15.              'r','s','t','u','v','w','x','y','z']
  16.     #word=raw_input("Enter your word:-")
  17.     wordlist='fucking lame ,brainless , dizzy, featherbrained, frivolous, giddy, harebrained, ignorant, illiterate, inane, know-nothing, silly, skittish, stupid, uneducated, unschooled, untaught, vacant, vacuous'
  18.     wordlist=wordlist.split(',')
  19.     for word in wordlist:
  20.         word=word.replace('-','')
  21.         number=bullshit(word,decode_list)
  22.         print "Bullshit meter for", word,  "is: ", number
  23.  
  24.  
  25. if __name__=='__main__':
  26.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement