Thank you. I’m completely stumped. I can’t see where I’m messing up with my code.
potionsOnTheWall = 10
numToTakeDown = 1
while True:
hero.say(potionsOnTheWall + " potions of health on the wall!")
# Sing the next line:
hero.say(potionsOnTheWall + " potion of health!")
# Sing the next line:
hero.say("Take " + numToTakeDown + " down, pass it around!")
potionsOnTheWall -= numToTakeDown
# Sing the last line:
hero.say(potionsOnTheWall + " potions of health on the wall.")
var potionsOnTheWall = 10;
var numToTakeDown = 1;
while (true) {
hero.say(potionsOnTheWall + " potions of health on the wall!");
// Sing the next line:
hero.say(potionsOnTheWall + " potions of health!");
// Sing the next line:
hero.say("Take " + numToTakeDown + " down, pass it around!");
potionsOnTheWall -= numToTakeDown;
// Sing the last line:
hero.say(potionsOnTheWall - numToTakeDown + " potions of health on the wall.");
}
What I was trying to say was that you should only minus it when redefining the variable not also when saying your message. You can just say the potions variable by itself. (along with potions of health on the wall of course)
Hi @jude_divinemask8, welcome to the CodeCombat Discourse!
Thank you for posting and trying to help nova777, but on this forum we don’t give out solutions – it ruins the point of the game. Instead of letting them win without learning anything, you should help them understand their problem and then they’ll be able to solve future levels and will be better at coding.
That’s why I’ve removed your code,
Thanks,
Danny