I need to make three stripes first one needs to be 40% of the shape height and 256 pixels wide the red component gradually increases from 0-255 and traverse the image horizontally
the second is 20% of the shape height, same width (height 300) it is solid green
third is 40% of the shape height and the blue will decrease from 255-0
I keep getting errors on the second for loop (rheight,rheight) Please help!!
def drawLines():
height = int(input("Enter Height: "))
width = 256
picture = makeEmptyPicture(width,height)
rheight = height*0.4
redValue = 0
for y in range(0,height):
for x in range(0,width):
pixel = getPixel(picture, x, y)
color = makeColor(redValue,0,0)
setColor(pixel, color)
redValue = redValue + 50
explore(picture)
for y in range(rheight,rheight):
for x in range(0, width):
pixel = getPixel(picture, x, y)
color = makeColor(0, 0, 0) # Change the current pixel to black
setColor(pixel, color)
explore(picture)