Question: Python coding add the coordinates of the fourth point ( 3 . 8 , 3 . 7 ) . Figure out where these numbers should

Python coding
add the coordinates of the fourth point (3.8,3.7). Figure out where these numbers should go and how else you need to modify your program to add this fourth point to your Polygon (add one line).
Also, add a light green background to the window and set the polygons fill color to light blue.
my code so far
from graphics import *
def main():
x =[3,2.5,3.8,5]
y =[2,7.3,3.7,4]
p_list=[] #Would be a list of Points. Its empty at first.
p_list.append(Point(x[0], y[0]))
p_list.append(Point(x[1], y[1]))
p_list.append(Point(x[2], y[2]))
p_list.append(Point(x[3], y[3]))
poly = Polygon(p_list) # We create a polygon object by using
# Polygon() function and giving it
# a list of Points as input
win = GraphWin("Connect Points - Melissa Carpenter", 500,500)
win.setCoords(0,0,8,8)
poly.draw(win)
main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!