Skip to content
Permalink
7e4728127e
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
15 lines (13 sloc) 428 Bytes
from random import choice as randomChoice
def isGreeting(userInput):
"""Returns Boolean indicating if user input was a greering."""
greetings = ["hello", "hi"]
for word in greetings:
if word in userInput:
return True
return False
def respond():
"""Prints a response to user greeting"""
responses = ["alright", "hiya"]
out = randomChoice(responses)
print(out)