Code for the balloon to pop properly after pin placement

2 weeks ago 18
ARTICLE AD BOX

When you hold the mouse down it places a pin. And when you let go the balloon pops. my main problem is that the balloon pops and releases, but the solution shows some grey part or something. I ran the autograph and what it says is

CenterX should not be 217.61
CenterY should not be 192.28
Nice effort... first point mismatch at (221.61,190.20)
Second point mismatch at (177.61, 212.28)

If someone can tell me what that all means that would be great.

Here’s what the solution is suppose to look like

enter image description here

Here’s the code

# background Rect(0, 0, 400, 400, fill='lightSkyBlue') # string Line(200, 330, 200, 400, fill='white', lineWidth=5, dashes=True) # balloon RegularPolygon(200, 370, 20, 3, fill='crimson') Oval(200, 185, 300, 340, fill=gradient('lightCoral', 'crimson', start='right-top')) pin= Group( Line(244,178,200,200, lineWidth=1), Circle(240,180,5, fill='blue') ) def onMousePress(mouseX, mouseY): # Draw the pin. ### Place Your Code Here ### pin.visible=True pin.centerX=mouseX pin.centerY=mouseY pass def onMouseRelease(mouseX, mouseY): # Pop the balloon. ### Place Your Code Here ### pop=Star(200,200,190,9, fill='lightSkyBlue', roundness=70) pin.visible=False pass ##### Place your code above this line, code below is for testing purposes ##### # test case: onMousePress(200, 200)
Read Entire Article