Guest User

Untitled

a guest
Jul 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. #Replace your information in that user2,user3, this is sample code you can edit yourself
  2. import random
  3. usertext=['Hai','Hello','hai','hello','hey']
  4. random_user=random.choice(usertext)
  5. userquery=['How are you','how are you']
  6. user2=['go to hell stupid','idiot','stupid']
  7. user3=['hell','rascal','idiot you are','donot talk with me']
  8. user4=['fck','don''t talk with me','fckoff']
  9. user5=['java','am a java developer']
  10. mybot=['am good waiting for you idiot :) lol']
  11. mybot2=['do not speak about yourself :P']
  12. mybot3=['rara Athinakodaka nuvvu nuvvu ante nenu anta :P']
  13. mybot4=['po ra Jaffa na jafda ga :P']
  14. mybot5=['so what am python bot i don''t know who are you Glad to meet you']
  15. random_reply=random.choice(mybot)
  16. random_reply1=random.choice(mybot2)
  17. random_reply2=random.choice(mybot3)
  18. random_reply3=random.choice(mybot4)
  19. random_reply4=random.choice(mybot5)
  20. while True:
  21. userInput=raw_input(">>>")
  22. if userInput in usertext:
  23. print(random_user)
  24. elif userInput in userquery:
  25. print(random_reply)
  26. elif userInput in user2:
  27. print(random_reply1)
  28. elif userInput in userquery:
  29. print(random_reply1)
  30. elif userInput in user3:
  31. print(random_reply2)
  32. elif userInput in user4:
  33. print(random_reply3)
  34. elif userInput in user5:
  35. print(random_reply4)
  36. else:
  37. print("BYE")
Add Comment
Please, Sign In to add comment