All you have to do is press the green flag and the rainbow will do all the work.
I found this idea in a book called 'EVERYTHING YOU NEED TO ACE COMPUTER SCIENCE AND CODING IN ONE BIG FAT NOTEBOOK' I found the book at Costco, Sydney.