Fire dancing level

Hello,

I’m very new to programming and I keep dying on this level. I don’t understand how to make a loop. I put a tab or 4 spaces in front of the walk left command and then the walk right command.

Thank you!

Ryan

You have to post your code for us to see where exactly your problem is. Assuming you use Python the 4 spaces in front are to put some code inside a block (for example the loop-block).

Its simple. For python, you must do this:

loop:
     self.attack(enemy)

and if you want to break from the loop, you have to put a variable and do this or so.

attackLimit = 0

loop:
      if attackLimit < 25:
            self.attack(enemy)
            attackLimit += 1

       else:
              break

and bam! you are out. This is all for python. I will do another post for Javascript.

ty for responding.

Do you remember this level? Its level 7. So I know I need to just walk back and forth left to right then repeat. I’m thinking that is what a loop should do. It should “loop” over these commands. Yet when I get to the end of the second line, it just stops. in the help text it eluded to starting the line with a TAB to make a loop but don’t really explain.

self.moveLeft()
self.moveRight()

Try this:

loop:
    # Insert your first command here.
    # Insert your second command here.

WOW!

I didn’t realize I had to type. seems dumb I know.

loop:

so how can I learn all the nuances of this command? I’m wondering how to end the loop, or just make it loop a certain number of times…

Thank you guys!!!

so on the next level I put some additional lines underneath the loop: so now I have four. It looks like it just runs through the four then repeats. I’m guessing I could just add as many in as I would like…

[quote=“ryanmvdl34, post:7, topic:5010”]
so how can I learn all the nuances of this command? I’m wondering how to end the loop, or just make it loop a certain number of times…
[/quote]You’ll learn about those things in later levels; for now, don’t worry about it.

[quote=“ryanmvdl34, post:8, topic:5010, full:true”]
so on the next level I put some additional lines underneath the loop: so now I have four. It looks like it just runs through the four then repeats. I’m guessing I could just add as many in as I would like…
[/quote]True. You can loop over pretty much anything.

The easy way to programming the Fire Dancing level, is this,

[redacted, we never post correct code]

After that, you have your Fire dancing completed, thank you for reading the comment and please if you like it, give it a thumbs up!? :] see ya!

I just need some tips on how to pass the level 8 Fire Dancing on Code Combat

We need more information than that. What’s happening? Did you write any code?

Hello, @pikachu333.
Thanks for contributing. However, note that our policy does not allow posting correct level solutions—that takes away the whole point of the game.

oh…
i didn’t see that! thanks!

i cant pass this [censored for bad language] level!!

Thank you for your opinion. Unfortunately, we can not help you, unless you give us a better description of what your problem is. Post your code, formatted properly according to the FAQ, along with a few sentences describing what happens when you run your code.

1 Like

WOW THIS LEVEL IS HARD
ALL THE FIREBALLS COME AT YOU AT ONCE
could someone explain the concept of this level and what type of code to use (i use python)

never mind i fixed my error
my miss type
sorry for inconvenience

I know you guys solved the problem but still I have tried all the solutions out there but it still doesn’t work (I use python)

I need help with the codes

Guys it’s really simple.
Simpler than you might think.
All you need to do is repeat the motion of moving to the right mark and back.
The Programmaticon 1 only grants 1 method.
Use it.
That’s the most obvious thing i can say without actually giving the solution away.