Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Replace your information in that user2,user3, this is sample code you can edit yourself
- import random
- usertext=['Hai','Hello','hai','hello','hey']
- random_user=random.choice(usertext)
- userquery=['How are you','how are you']
- user2=['go to hell stupid','idiot','stupid']
- user3=['hell','rascal','idiot you are','donot talk with me']
- user4=['fck','don''t talk with me','fckoff']
- user5=['java','am a java developer']
- mybot=['am good waiting for you idiot :) lol']
- mybot2=['do not speak about yourself :P']
- mybot3=['rara Athinakodaka nuvvu nuvvu ante nenu anta :P']
- mybot4=['po ra Jaffa na jafda ga :P']
- mybot5=['so what am python bot i don''t know who are you Glad to meet you']
- random_reply=random.choice(mybot)
- random_reply1=random.choice(mybot2)
- random_reply2=random.choice(mybot3)
- random_reply3=random.choice(mybot4)
- random_reply4=random.choice(mybot5)
- while True:
- userInput=raw_input(">>>")
- if userInput in usertext:
- print(random_user)
- elif userInput in userquery:
- print(random_reply)
- elif userInput in user2:
- print(random_reply1)
- elif userInput in userquery:
- print(random_reply1)
- elif userInput in user3:
- print(random_reply2)
- elif userInput in user4:
- print(random_reply3)
- elif userInput in user5:
- print(random_reply4)
- else:
- print("BYE")
Add Comment
Please, Sign In to add comment