Skip to content

Instantly share code, notes, and snippets.

@jakariyaa
Last active March 3, 2020 14:55
Show Gist options
  • Save jakariyaa/0c8d7e9a1e875d0be18bf472f8a272c7 to your computer and use it in GitHub Desktop.
Save jakariyaa/0c8d7e9a1e875d0be18bf472f8a272c7 to your computer and use it in GitHub Desktop.
Just a fun bot made while practicing. Don't judge me, Um noob!
run = True
while run:
def magic_bot(message):
words = message.split(" ")
database = {
"hi": "Hello there!",
"how are you?": "Better than you ;)",
"who are you?": "I'm a bot made by Zakariya Abbas. Currently I'm so dumb like him!"
"\nBut I'm hoping to get intelligent one day,",
"glad to hear that": "Wah Wah! Look who's saying",
"bye": "Nice meeting with you. Take Care! *Type 'stop' to get rid of me."
}
output = ""
for word in words:
output += database.get(word, word) + " "
return output
bot_name = "Zaku BOT :"
input_msg = input("> ")
if input_msg.lower() == "stop":
run = False
print("Bye Bye! Take Care Baby!")
else:
print(bot_name, magic_bot(input_msg))
else:
print("Sys32 : *Bot Stopped Working!*")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment