Fork me on GitHub
ICM Quizzes

Quiz 2: Variables


1. Draw an ellipse at the position of the mouse, like the sketch above.


2. Based on question 1, shift the background color from black to white as you move the mouse from left to right, like the sketch above. function map() might help.


3. Write a program that can draw or paint something on the screen every time you move the mouse, like the sketch above.


4. Based on question 3, change the color of the brush to a random color when you click the mouse, like the sketch above. function mousePressed() and function random() might help.