Fire dancing level


#1

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


#2

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).


#3

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.


#4

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()

#6

Try this:

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

#7

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!!!


#8

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…


#9

[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.


#10

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!


#11

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


#12

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


#14

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.


#15

oh…
i didn’t see that! thanks!


#16

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


#17

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.


#18

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)


#19

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


#20

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)


#21

I need help with the codes


#22

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.