Hey guys! I’m still new to coding and I’ve been trying to make a code that is sort of a game. I need help near the end where It says the variable ‘start_the_battle’ is not the defined, even though I thought I defined if above where I use it. I’ve the code below and I hope you guys are able to help. Have a good one guys!
import random from words import monsters print('Welcome to battle simulator') # Instructions setup instructions = '''This game will give you 3 weapons, It is your choice to use one of the weapons to kill each monster. Each monster can only be killed with one weapon.if the wrong weapon is chosen, you die. Good luck hero!''' instructions_ask = input() if instructions_ask == 'Instructions': print(instructions) # Game setup weapons = 'Sword', 'Bow', 'Magic' monster = random.choice(monsters) attack = input() start_the_battle = input() if start_the_battle == 'Battle' 'battle': print('Oh no! A ' + monster + 'has appeared!') print(weapons) if attack == random.choice(weapons): print('You killed the monster!')