I think it’s a bug code run properly. I can see "
success " and I am able to find the hidden door. But when I was traying to send my answer system give me a note that I wrote my code wrong. That’s not true. I dont know why when I was sending my result (the full screen moment) Laszlo taled diferent first number than before when code run properly.
Next time I changed :
var aga =sim*x
x was the number I wrote befour and code run properly -1 . I sended my result. It was a little confusing but can help.
Does anyone had problem like this or it’s just my luck
Make sure you read the comments to figure out how to solve the level. If you need to, you can reset the level to bring the old comments back.
// Multiply Simonyi's number by Laszlo's to get Agata's number.
var aga = sim * x; // fix this (hint: only the x needs to be replaced)
// finish up the level
I solved the level. The problem was why is the difference between first success information and no success information when I was sending results. When I wrote code e.g. it was
var aga= sim*3;
I get success information. So the level was solved. But when I press send result First number was different and he told not 3 but 2 and I don’t understand why. First time I see something like this, that I must change good code before sending but after “success”
The numbers are randomly generated everytime. You already have the magic number stored in a variable, though.
Check the comment right above the calculation again:
// Multiply Simonyi's number by Laszlo's to get Agata's number.
So, you have 4 variables in this program: las, erz, sim, and aga.
Instead of using a constant number (which was 3 in your latest post), you should replace it with the variable you need.
Example:
var a = 3
var b = 4
var cSquared = (a * a) + (b * b) // notice how there aren't any numbers written here?
I know that the numbers are randomly generated everytime. But it should not be changed between you got success and open the wizard door and sendind the solution again on the full screen moment and you see red no success note
Everything is ok about your solution when you are not able to get green success information but after you see that information, code should not be changed by program in no circumstances.
The level is working as it should. The numbers are randomized between your test run and your submit run.
Try to find a solution that works 100% of the time you submit.
Let’s finish this level because it has an important concept.
var aga = sim * x; // replace the x with the correct variable
Variables to choose from: las, erz, sim, and aga
Which variable should replace x so the code goes along with the following comment? // Multiply Simonyi's number by Laszlo's to get Agata's number.
The goal is to teach you to make a code that will work for any iteration of the level. Otherwise, you could just hard code an answer to beat one version of the level.
Think of the run that happens before you click “Submit” as a practice run.
This is not a bug. It is intentional. The reason is to force you to use variables instead of using numbers as constants. A variable will change with the circumstances. A number won’t. If you need to review what variables are and how to use them, then go back and redo some previous levels.