Are you sure?
Do you want to delete “Function Example 5” permanently? You will not be able to undo this action.
import icons def soccerball(p1, p2, color="black"): ball = icons.Futbol(width=30, height=30, x=100-p2, y=p1, color=color) points = [(p1, p2), (p2, p1), (p1, 100-p2), (100-p2, p1)] return (ball, points) def change_location(ball, p): ball.x = p[0] ball.y = p[1] ball1, ball1_points = soccerball(50, 85) ball2, ball2_points = soccerball(50, 15, color="red") ball3, ball3_points = soccerball(20, 10, color="blue") ball4, ball4_points = soccerball(60, 30, color="aquamarine") for i in range(len(ball1_points)): with animation(duration=0.8): change_location(ball1, ball1_points[i]) change_location(ball2, ball2_points[i]) change_location(ball3, ball3_points[i]) change_location(ball4, ball4_points[i])