
xxxxxxxxxx
#Secret Key Challenge - www.101computing.net/secret-key/
import turtle, draw
key1 = "S4E1S2E2N2E4S2E2N2E1N4"
key2 = "S3E2S2E4N2E2N3"
key3 = "S3W2S2E2N1E5S1E2N2W2N3"
print("#~#~#~#~#~#~#~#~#~#~#~#~#~#~#")
print("# The Secret Key #")
print("#~#~#~#~#~#~#~#~#~#~#~#~#~#~#")
print("")
key = 1
while key!="X":
print("What key would you like to cut?")
key = input("Type 1, 2, 3 or 4 for the secret key!").upper()
if key=="1":
print("The code for this key is: " + key1)
draw.drawKey(key1)
elif key=="2":
print("The code for this key is: " + key2)
draw.drawKey(key2)
elif key=="3":
print("The code for this key is: " + key3)
draw.drawKey(key3)
elif key=="4":
code = input("Type the secret code for this key:").upper()
draw.drawKey(code)
else:
print("This key does not exist. Try again and choose a key between 1 and 4")
task_alt