Advertisement
Protocol_

Clever bot [Python]

Oct 10th, 2012
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.33 KB | None | 0 0
  1. '''
  2. Possible clever bot
  3. Coded by Donny
  4. Version : 1.0
  5. '''
  6. from random import randint
  7. from random import choice
  8. questions = {"hello":"Hey!","sup":"Nothing much.","lol":"What's so funny about?","what is your name?":"My name is BOT", "who made you?":"DONNY<3", "how are you?":"I'm fine", "i'm fine":"Great!", "hi":"Hey!", "hey":"Hello",
  9.              "do you have a life":"No, where do I buy one?","are you a robot?":"Ofcourse I am.","yes":"Good!","fuck you":"Go fuck yourself",
  10.              "i don't know":"ok..","no":"=(", "fuck":"Go away.", "cool":"I know right!", "bye":"Good bye!","gtg":"Bye!"
  11.              }
  12. def bot():
  13.     bot = ['What is your name?', 'How are you?', "How's life?", "Cool", "What is your father's name?", "Do you have any pets?",
  14.  
  15.            "Do you have a computer?", "Do you think Linux is better than Mac and Windows?","How old are you?", "No", "Yes", "Right here.",
  16.            "Was that funny?", "laughing my robotic ass off!", "You still here? :0", "Artificial intelligence.", "Are you scared of the dark?",
  17.            "Do you eat bugs?","Do you have a facebook account?"
  18.  
  19.            ]
  20.     bq = choice(bot)
  21.     print(bq)
  22. def human(user):
  23.     do = (questions[user])
  24.     print(do)    
  25. while True:
  26.     user = input("Type : ").lower()
  27.     if user not in questions:
  28.         bot()
  29.     else:
  30.         human(user)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement