[Solved] How do i have the program print a different response each time? [closed]


You can try using the random.choice() function provided by the random module:

import random

greetings = ["How are you!", "Why are you?", "What are you?"]
print("Hi, ", input("What is your name?"), random.choice(greetings))

This will give you random choices from the greetings list everytime.

solved How do i have the program print a different response each time? [closed]