Feedback: Deja Brew

The level is awesome. I have nothing to say but thanks to the creator. It is very beautiful.
No bugs I’ve detected.

1 Like

It’s good, but’s it’s too easy. you just have to put a couple say(); commands. then again, not everybody knows strings as well as i do (khanacademy). but im pretty sure they do

1 Like

Overall a pretty nice and straightforward level, though it seems my hero’s singing is a bit out of sync with the NPCs.

@BarnZarn This level focuses on string concatenation. There are some later levels that require string concatenation, but that concept was not well explored until now. Keep in mind that CodeCombat’s goal is to be an introduction to programming accessible to those that have no previous programming experience, so it must explore all these basic concepts.

1 Like

oh makes sense. yes it’s out of sync because your loop frame-rate is faster then theirs. thats my assumption.

I think it would be better if they were singing in-sync. And maybe give the heroes more health or equipment for consistency.

More string-manipulation levels would be good. How about one where you have to sing one word at a time by splitting the whole song?

Please help me. What Am I doing wrong:

potionsOnTheWall = 10
numToTakeDown = 1
while True:
self.say(potionsOnTheWall + " potions of health on the wall!")
# Sing the next line:
self.say(potionsOnTheWall + " potions of health!")
# Sing the next line:
self.say(“take”+numToTakeDown + " pass it around!")
potionsOnTheWall -= numToTakeDown
# Sing the last line:
self.say(potionsOnTheWall + " potions of health on the wall!")

Thanks.

Could use some help, please. Will include my code below. What is happening is it starts at 10 with the rounds of singing, and gets down to the round for 5 potions of health… and fails. Tried it a couple of different ways, not sure what the hangup is. What would cause it to work for 5 rounds and then die?
Any help is appreciated. Thoughts?

potionsOnTheWall = 10
numToTakeDown = 1

while True:
    self.say(potionsOnTheWall + " potions of health on the wall!")
    # Sing the next line:
    self.say(potionsOnTheWall + " potions of health!")
    # Sing the next line:
    self.say("Take" + numToTakeDown + "down, pass it around!")
    potionsOnTheWall -= numToTakeDown
    # Sing the last line:
    self.say(potionsOnTheWall + "potions of health on the wall.")

Hugh

The level has timeout so you should only sing until 5 potions of health.

You are failing because there is a very small difference between what you are saying and what are you supposed to say.

I think you need space after take on the 3rd line "Take " and a space before down " down, pass .."
and a space at the beginning of the 4th line: " potions of health on the wall."

Also you might have changed a “!” with and "."
Check the lines very carefully with the comments at the top and with what the goliath is singing

1 Like

AdrianCgw, with the addition of just 3 spaces, that did it. Thank you! Success from running those updates. I appreciate the help, and will know for future cases to look for that issue. Thanks much-

i need help plzzzz

Good for you. Fortunately, we cannot help you unless you tell us what your problem is, along with your code, properly formatted, of course. Read the FAQ before you post again, if you have not already.

var potionsOnTheWall = 10;
var numToTakeDown = 1;
var numberofpotions = 5;

while(true){
this.say(“otionsOnTheWall” + " potions of health on the wall!");
this.say(potionsOnTheWall + " potions of health!");
this.say(“Take " + numToTakeDown + " down, pass it around!”);
this.say(“potionsOnTheWall” + " potions of health on the wall.");

}
it only goes to 5 the stopes

I intended that punctuation and whitespace would not make you fail this level, but there were cases that slipped through.

It should be less picky about these things now.

im also having trouble same code

me and other 2 people are trying but the code will not pass

this is my code

var potionsOnTheWall = 10;
var numToTakeDown = 1;
while(true) {
this.say(potionsOnTheWall + " potions of health on the wall!");
// Sing the next line:
this.say(potionsOnTheWall + " potions of health! “);
// Sing the next line:
(“Take " + numToTakeDown + " down, pass it around!”); potionsOnTheWall -= numToTakeDown;
// Sing the last line:
(potionsOnTheWall + " potions of health on the wall.”);
}

hey could someone give me the code for deja brew plz a i ask of u

@Austin_Thoms Don’t put quotes around your variable names.

When you write self.say("potionsOnTheWall") you are literally saying the words “potionsOnTheWall”. What you want is the value contained in the potionsOnTheWall variable. Do not put quotes around the variable name when you want to read the value from a variable.

Please take the time to read the comments in the level’s initial code. You have to decrement the potionsOnTheWall variable’s value at some point in the loop.

You also have a typo in your code: otionsOnTheWall is missing a p in the start.

This is my code:

potionsOnTheWall = 10
numToTakeDown = 1
while True:
self.say(potionsOnTheWall + " potions of health on the wall!");
# Sing the next line:
self.say(potionsOnTheWall + " potions of health!");
# Sing the next line:
self.say(“Take " + numToTakeDown + " down, pass it around!”);
potionsOnTheWall -= numToTakeDown
# Sing the last line:
self.say(potionsOnTheWall + " potions of health on the wall.");

Good for you?
Erm…
A little rude perhaps?

1 Like