Present random shape, then fixed order (assignment help)

So now how can I write the program I intended at first?