The program below is designed to tell a knock-knock joke using nested "if / else" statements and the "not equal" (!=) operator. The user plays the part of the person answering the door, so should type in "Who's there?" in response to "Knock knock". When the program answers "Beet", the user should type in "Beet who?". Your program logic should verify that the user types in the correct responses and print "Try again" if an incorrect response is entered.

The following example demonstrates the expected program output when the user enters the correct "Who's there?" and "Beet who?" answers.

Knock knock
Who's there?
Beet
Beet who?
Beets me!
If the user enters anything other than "Who's there?" after "Knock knock", the program should print "Try again" and end with no further input or output.

Knock knock
Who?
Try again
If the user enters anything other than "Beet who?" after "Beet", the program should print "Try again" and end with no further input or output.

Knock knock
Who's there?
Beet
Who?
Try again
Notice that the user input and checks are case-sensitive, so typing with the correct capitalization is important!

The starting code contains some of the input and output statements. You are responsible for adding the "if /else" logic where needed to make the program work.

Add the first "if" statement that will be True when the user's answer is not equal to "Who's there?"
Add an "else" statement for the first "if". Inside that "else" block, the second input() statement will produce the second answer to "Beet". Afterward, you will add a nested "if/else" statement as follows:
If the second answer is not equal to "Beet who?", then print "Try again"
Else print "Beets me!"
Hint: the indentation of each comment shows the proper indentation for the "if" or "else" statement you will write underneath. Do not change the indentation of any print() or input() statements.

answer = input("Knock knock\n")

# under this comment, write an "if" statement that will print "Try again" if the answer is not equal to "Who's there?"

print("Try again")
# under this comment, start an "else" block

answer = input("Beet\n")

# under this comment, write an"if" statement that will print "Try again" if the answer is not equal to "Beet who?"

print("Try again")
# under this comment, start an "else" block that will contain the final "Beets me!" output.

print("Beets me!")

answer = input("Knock knock\n")

# if statement to check if the answer is not equal to "Who's there?"
if answer != "Who's there?":
print("Try again")
# else block for the correct response to "Who's there?"
else:
answer = input("Beet\n")

# if statement to check if the answer is not equal to "Beet who?"
if answer != "Beet who?":
print("Try again")
# else block for the correct response to "Beet who?"
else:
print("Beets me!")