i need help with the wizards door. my code (i use python)
# Move to Laszlo and get his secret number.
hero.moveXY(30, 13)
las = hero.findNearestFriend().getSecret()
# Add 7 to Laszlo's number to get Erzsebet's number.
# Move to Erzsebet and say her magic number.
erz = las + 7
hero.moveXY(17, 26)
hero.say(erz)
# Divide Erzsebet's number by 4 to get Simonyi's number.
# Go to Simonyi and tell him his number.
# Multiply Simonyi's number by Laszlo's to get Agata's number.
# Go to Agata and tell her her number.
i just dont understand what to do…
first:
secret
second:
secret + 7
third:
(7 + secret) % 4
last:
((7 + secret) % 4)*secret
im sorry, but i dont understand…could you please explain? (and i use python)
@sonicrosebeam So you are being asked to look at the code provided as an example:
# Add 7 to Laszlo's number to get Erzsebet's number.
# Move to Erzsebet and say her magic number.
erz = las + 7
hero.moveXY(17, 26)
hero.say(erz)
The above code is what you will be using to create more code.
There are 3 steps to the process, the first being given, complete the next two.
2
# Divide Erzsebet's number by 4 to get Simonyi's number.
# Go to Simonyi and tell him his number.
3
# Multiply Simonyi's number by Laszlo's to get Agata's number.
# Go to Agata and tell her her number.
Those are the instructions of what to do.
Erzsebet’s number is the value stored in the variable erz
or in this case: erz = las + 7
Laszlo’s number is the value stored in las
it is: las = hero.findNearestFriend().getSecret()
If las
was 7 then era
would be 7 + 7 or 14. Does that make sense?
They are asking you to create a variable for Simonyi’s number and Agata’s number and then store a value in them. You could use sim
for a variable name for Simonyi’s number if you wanted
so: sim =
And then you would have to fill in the rest.
They are asking you to create and name the 2 new variables.
thankyou so much for the help!!!
Why so the numbers change every time i submit it just makes me redo the math plz help