# Could you help me at 5 The Wizard's Haunt(PYTHON)

``````type or paste code here
# Move to 'Zsofia' and get the secret number from her.
hero.moveXY(18, 20)
zso = hero.findNearestFriend().getSecret()

# Divide 'Zsofia's number by 4 to get 'Mihaly's number.
# Move to 'Mihaly' and say his magic number.
mih = zso / 4
hero.moveXY(30, 15)
hero.say(mih)

# Divide 'Mihaly's number by 5 to get 'Beata's number
# Move to 'Beata' and say her magic number.
hero.moveXY(42,20)
hero.say(2.4)
# Subtract 'Beata's number from 'Mihaly's to get Sandor's number.
# Move to 'Sandor' and say his magic number.
hero.moveXY(38,37)
hero.say(0.48)

``````

Maybe you calculated the numbers wrongly. you should continue to use the operations so the computer can calculate it for you.

1 Like

Could you also post the level link and what exactly is your problem. To me, this looks like the default code that is given to you

Thanh you

``````type or paste code here
``````
``````type or paste code here
``````

# Move to ‘Zsofia’ and get the secret number from her.

hero.moveXY(18, 20)
zso = hero.findNearestFriend().getSecret()

# Move to ‘Mihaly’ and say his magic number.

mih = zso / 4
hero.moveXY(30, 15)
hero.say(mih)

# Move to ‘Beata’ and say her magic number.

hero.moveXY(42,20)
hero.say(2.4)

# Move to ‘Sandor’ and say his magic number.

hero.moveXY(38,37)
hero.say(-9.6)

The seed of the level changes each time, so the third and fourth numbers will not always be 2.4 and 0.48. In other words, you need to save a variable for the third number that is equal to 'Beata’s number times 5 and say it, and you need to save a variable for the fourth number that is equal to 'Minhaly’s number minus 'Beata’s number and say it.

Here is an example of the process I described above:

``````# Lets say the number you are manipulating is defined as 'A'
# This is how you would find the number times three and say it
newNumber = A * 3
hero.say(newNumber)
``````
1 Like