Draw a rainbow—use what you know about colors, pixels, and drawing operations to draw a rainbow. Is this easier to do with our drawing functions or by manipulating individual pixels? Why?
Without knowing about the addOvalFilled function by checking through the JES helper functions, this problem is much more difficult, as below:
```
def drawRainbow():
canvas = makeEmptyPicture(21,20)
makeArc(canvas,7, 7, red)
makeArc(canvas,7, 8, orange)
makeArc(canvas,7, 9, yellow)
makeArc(canvas,7, 10, green)
makeArc(canvas,7, 11, blue)
makeArc(canvas,7, 12, makeColor(255,0,255))
show(canvas)
return canvas;
def makeArc(src, x, y, color):
setColor(getPixel(src,(x),y),color)
setColor(getPixel(src,(x+1),y-1),color)
setColor(getPixel(src,(x+2),y-2),color)
setColor(getPixel(src,(x+3),y-2),color)
setColor(getPixel(src,(x+4),y-2),color)
setColor(getPixel(src,(x+5),y-1),color)
setColor(getPixel(src,(x+6),y),color)
```
You might also like to view...
Suppose that you have the declaration:int num = 94;double x = 73.92;String str = "Programming";What is the output of the following statements?System.out.println("123456789012345678901234567890");System.out.printf("%5d%6.2f %15s%n", num, x, str);
A. 123456789012345678901234567890 94 73.92 Programming B. 123456789012345678901234567890 94 73.92 Programming C. 123456789012345678901234567890 94 73.92 Programming D. 123456789012345678901234567890 94 73.92 Programming
Provide at least four suggestions for choosing passwords and three suggestions for using passwords.
What will be an ideal response?