generate functionMon, 02 Jan 2023

create an array containing the colours of the rainbow, then print them in a random order

import random rainbow = ["red", "orange", "yellow", "green", "blue", "purple"] random.shuffle(rainbow) print(rainbow)

Questions about programming?Chat with your personal AI assistant