it gets a random number and mode and counts to the number with numbers from 1 to 3 keep on clicking the green flag until the mode is not 1