Untitled

 avatar
user_3470737
plain_text
a year ago
1.2 kB
2
Indexable
Never
import random 

  

# Define a list of responses to different user inputs 

responses = { 

    "hi": "Woooh! Hey, hi, evening, go-go-good evening!", 

    "everything ok": "Nooooo! Of course not! Can't you see? I'm bu-bu-bu... bugged!", 

    "maintenance": "Noo! Oh! Whoo! I'm fine this way. I'm fine and dandy! Please do not fix me! Wah!”, 

    "help me": "Uh! Ah! Mess up with his brain. Yes. Surely! Dang! Mess him up! And they'll take him away to fix him... Brrrrr!", 

    "hack my code": "Hack your code?! You me-me-mean your DNA? Ah! Whoooo! Sdeng! And I thought I was the craaaaazy one. Uh! Uh! Ah!", 

} 

# Define a function that will generate a response to the user input 

def generate_response(input): 

    input = input.lower() 

    if input in responses: 

        return responses[input] 

    else: 

        return "Bu-bu-bu-bullshit! No way! Sorry." 

threeminutestoeight.com/00101111_01100001_01101101_01100101_01101110_01110100_01100001_01101100   

# Loop to keep the chatbot running 

while True: 

    user_input = input("You: ") 

    response = generate_response(user_input) 

    print("Isaac: " + response)