The aim of this task was to practice my programming skills and try something new. I had to write out lines of code to create a square that changed colour when the mouse is clicked.

To do this I had to first tell the program what colours I wanted it to use, then told it that it needed to actually make a square, then that it had to fill this square when the mouse was clicked but that when it was clicked it would use a random colour from the selection I gave it and then finally told it to actually make it happen or ‘draw it’.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: