The program won't end when I try to get it to end with a sys.end command
I have tried to use sys.end with this line but it does not work
if answers2 == "YOUR ATTACK MISSES AND YOU DIE! RESTART GAME"
sys.end
and here is this code
#here is where I want the different options to be! I set it up like this for random options
answers1 = [
"A BIG SPIDER COMES AT YOU! WHAT DO YOU DO?",
"A GOBLIN COMES AT YOU! WHAT DO YOU DO?",
"A GHOST COMES AT YOU! WHAT DO YOU DO?",
"AN UNDEAD COMES AT YOU! WHAT DO YOU DO?",
"AN ASSASSIN COMES AT YOU! WHAT DO YOU DO?"
]
answers2 = [
"YOUR ATTACK MISSES AND YOU DIE! RESTART GAME",
"YOUR ATTACK HITS! MOVING ON"
]
if attack1.lower().strip() == "attack":
print random.choice(answers2)
# right here is where I want to have it so if you get "YOUR ATTACK MISSES AND YOU DIE!" you stop the game
^^^ here are the different options for what is to happen
if you need the whole code just let me know! I'm new to this website!
I expect the output to end the program but the program just keeps going
Just letting you know, I am really new to python so please be patient