A stupid AI chatbot, ChugMoog:










E=len

A=print

import random as D

def B(prompt):

   F=prompt;A='';B=F.lower().replace('.',A).replace(',',A).replace('?',A).replace('!',A).replace("'",A).replace('"',A).replace(';',A).replace(':',A).replace('*',A)

   if B==A:return\\_(º‿º)_/¯'

   H=[A in B for A in['fuck','shit','crap','orange','nigger','damn','bitch','ass','cock','dick','retard','frick']];I=sum(H)!=0

   if I:return"Woah! Let's keep things positive. How can I assist you?"

   elif D.randint(0,3)==0:C='The real ';C+=B.split()[D.randint(1,E(B.split()))-1];C+=' was the friends we made along the way.';return C

   elif D.randint(0,2)==0:C='What\'s a "';C+=B.split()[D.randint(1,E(B.split()))-1];C+='"?';return C

   elif'name'in B:return"My name is ChugMoog. What's yours?"

   elif'hello'in B.split()or'hi'in B.split():return"Hello! I'm ChugMoog, your virtual AI assistant. What's your name?"

   elif F[E(F)-1]=='?'and D.randint(0,2)==0:return"That's a good question."

   else:G=["I don't follow.",'Could you repeat that?',"I don't understand.",'Please rephrase.','Could you rephrase that?','What do you mean?','You might be able to find help at youtu.be/QDia3e12czc','Ayoo'];return G[D.randint(0,E(G))-1]

A('\nChugMoog v1.1')

A('AI may display innaccurate or sensitive imformation.')

A('-------------\n')

A('How can I assist you today?')

while True:C=input('$> ');A(B(C))