Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import random
  2.  
  3. word_file = "/usr/share/dict/words"
  4. wordfile=open(word_file).read().splitlines()
  5.  
  6. def reply():
  7. i = 0
  8. reply = []
  9. words = random.randint(0,100)
  10. while i < words:
  11. reply.append(random.choice(wordfile))
  12. i = i+1
  13. reply1 = ' '.join(reply)
  14. print reply1
  15.  
  16. def ask():
  17. raw_input('Ask your question: ')
  18. reply()
  19.  
  20. while True:
  21. ask()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement