Sectie 1. Hoofdstuk 7
single
Challenge: Polygon Plotting
Veeg om het menu te tonen
Taak
Veeg om te beginnen met coderen
Practice your geometric plotting skills by visualizing a polygon defined by a list of vertices. This challenge builds on your experience with matplotlib and shape visualization from the previous chapter.
- Accept a list of vertices, where each vertex is a tuple of two numbers representing the x and y coordinates.
- Plot the polygon by connecting the vertices in order, closing the shape by connecting the last vertex back to the first.
- Display the plot using matplotlib.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 7
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.