I am trying to solve this exercise but i don't get the solution.
Randomly the computer has to choose one of the Arrays as the “best” number. In the window I need to have a message that shows what the array is and which the sketch considers the best. These should always change.
I hope so much someone can help me, I have an exam soon...
This is my code but I am doing something wrong.
float  HelloArray= new float [int(random(5,11))];
I am trying to solve this problem, that seems easy at first sight but I guess it's not that easy for me.
I want to move this image to a random location at Mouse Click. Do you have any idea about what am I doing wrong?
This is what happens: When I click the first time, the image it changes position to a random location and everything seems fine. But then, when I click again, it moves randomly for a moment to a new position but immediately after it goes back to the previous location.
I cannot solve this problem: I have to create a sketch with a button. When I click on the button, I have to put in the window, the time that has elapsed since the sketch started. Every time the button is pressed a new time is posted, but the time doesn’t change until the button is pressed.