Skip to main content
fix copyright violation: properly attribute author of image and update URL since the image is not present anymore in the English Wikipedia article “Rainbow”
Source Link

enter image description hereA rainbow emerges from a forest. (Source: Wikipedia)
When Image credit: CC-By-SA 2.5 Wing‑Chi Poon via Wikimedia Commons

When we look at a rainbow it will always have the colors from top to bottom:
Red; orange; yellow; green; blue; indigo; violet

enter image description here (Source: Wikipedia)
When we look at a rainbow it will always have the colors from top to bottom:
Red; orange; yellow; green; blue; indigo; violet

A rainbow emerges from a forest.
Image credit: CC-By-SA 2.5 Wing‑Chi Poon via Wikimedia Commons

When we look at a rainbow it will always have the colors from top to bottom:
Red; orange; yellow; green; blue; indigo; violet

Commonmark migration
Source Link

##Introduction:

Introduction:

##Challenge:

Challenge:

##Challenge rules:

Challenge rules:

##General rules:

General rules:

##Test cases (first n=1 through n=10, and n=25):

Test cases (first n=1 through n=10, and n=25):

##Introduction:

##Challenge:

##Challenge rules:

##General rules:

##Test cases (first n=1 through n=10, and n=25):

Introduction:

Challenge:

Challenge rules:

General rules:

Test cases (first n=1 through n=10, and n=25):

Tweeted twitter.com/StackCodeGolf/status/1029473150206128133
added 163 characters in body
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394
  • 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
added 1502 characters in body
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394
Loading
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394
Loading