Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
fix copyright violation: properly attribute author of image and update URL since the image is not present anymore in the English Wikipedia article “Rainbow”
You are allowed to use capital VIBGYOR instead of lowercase
There should be a space between the individual rainbows
Any amount of leading and/or trailing spaces/new-lines are allowed, as long as the actual rainbow (wherever it is placed on the screen) is correct
The input will always be a positive integer (>= 1). The behavior when n=0 is therefore undefined, and the program/function can do whatever it wants (outputting nothing; outputting the rainbow of n=1; random output; fail with an error; etc.)
You are allowed to output a list/array of strings or 2D array/list of characters if you want (you could add the actual pretty-printing code in the TIO footer).
Ignore the fact that the outputs looks more like Mayan temples than rainbows.. xD
You are allowed to use capital VIBGYOR instead of lowercase
There should be a space between the individual rainbows
Any amount of leading and/or trailing spaces/new-lines are allowed, as long as the actual rainbow (wherever it is placed on the screen) is correct
The input will always be a positive integer (>= 1). The behavior when n=0 is therefore undefined, and the program/function can do whatever it wants (outputting nothing; outputting the rainbow of n=1; random output; fail with an error; etc.)
Ignore the fact that the outputs looks more like Mayan temples than rainbows.. xD
You are allowed to use capital VIBGYOR instead of lowercase
There should be a space between the individual rainbows
Any amount of leading and/or trailing spaces/new-lines are allowed, as long as the actual rainbow (wherever it is placed on the screen) is correct
The input will always be a positive integer (>= 1). The behavior when n=0 is therefore undefined, and the program/function can do whatever it wants (outputting nothing; outputting the rainbow of n=1; random output; fail with an error; etc.)
You are allowed to output a list/array of strings or 2D array/list of characters if you want (you could add the actual pretty-printing code in the TIO footer).
Ignore the fact that the outputs looks more like Mayan temples than rainbows.. xD