Present random shape, then fixed order (assignment help)

Please format your code. You can do that by editing your post (the little pen icon on the top right corner) and then selecting your code and clicking on that icon: </>

Now for your program, start by writing a code that is simply changing the background color when you press a key: from red to green to blue to red again, etc. You will need that kind of structure to change the shapes.

Also there is something that is not clear: should the program change shape randomly when the user press a key or the random selection happen just at the beginning and then when the user press a key it will change it a predefined order?