def check_phrase(requested_phrase, attempts):
for i in range(attempts):
phrase =input("Please enter the phrase: ")
if phrase == requested_phrase:
print("Good job")
return True;
else:
print("Please try again")
print("Attempts exceeded")
return False
def main():
phrase = "Hello world"
attempts = 3
check_phrase(phrase, attempts)
if __name__ == "_main_":
main()
ZGVmIGNoZWNrX3BocmFzZShyZXF1ZXN0ZWRfcGhyYXNlLCBhdHRlbXB0cyk6CiAgICBmb3IgaSBpbiByYW5nZShhdHRlbXB0cyk6CiAgICAgICAgcGhyYXNlID1pbnB1dCgiUGxlYXNlIGVudGVyIHRoZSBwaHJhc2U6ICIpCiAgICAgICAgaWYgcGhyYXNlID09IHJlcXVlc3RlZF9waHJhc2U6CiAgICAgICAgICAgIHByaW50KCJHb29kIGpvYiIpCiAgICAgICAgICAgIHJldHVybiBUcnVlOyAKICAgICAgICBlbHNlOgogICAgICAgICAgICBwcmludCgiUGxlYXNlIHRyeSBhZ2FpbiIpCiAgICBwcmludCgiQXR0ZW1wdHMgZXhjZWVkZWQiKQogICAgcmV0dXJuIEZhbHNlCmRlZiBtYWluKCk6CiAgICBwaHJhc2UgPSAiSGVsbG8gd29ybGQiCiAgICBhdHRlbXB0cyA9IDMKICAgIGNoZWNrX3BocmFzZShwaHJhc2UsIGF0dGVtcHRzKQppZiBfX25hbWVfXyA9PSAiX21haW5fIjoKICAgIG1haW4oKQ==