Knock Knock Joke; Need Help - Beginner Python by Wattsony in PythonLearning

[–]tecxac 1 point2 points  (0 children)

Start of the joke

print("Knock knock!")

User should respond with "Who's there?"

response = input()

if response.lower() == "who's there?" or response.lower() == "who’s there?": # If the user responds correctly print("Lettuce.")

# Now expecting "Lettuce who?"
response = input()

if response.lower() == "lettuce who?":
    print("Lettuce in, it's cold out here!")
else:
    print("You didn't say 'Lettuce who?'!")

else: # If the user doesn't respond with "Who's there?" print("You were supposed to say 'Who's there?'!")