title: Function to print simple plot
body: <p>In an exercise I am asked to write a function <code>def render_plot():</code> which takes a set of coordinates <code>[(2, 3), (-1, 2), (1, -1), (0, 1)]</code> and renders a plot where every coordinate from the set is a star <code>*</code> and every other position is a space <code>⎵</code>. The plot should also have a frame. It would look like this:</p>
  <pre class="lang-none prettyprint-override"><code>######
  #   *#
  #*   #
  # *  #
  #    #
  #  * #
  ######
  </code></pre>
  <p>where the star in the upper right corner is the <code>(2,3)</code> position and the bottom left corner (not the frame) is the <code>(-1,-1)</code> position.</p>
  <p>So far this is my code:</p>
  <pre><code>def render_plot(a):
      s = &quot;&quot;
      l = list(zip(*plot))
      height = max(l[1])-min(l[1])+1
      widht = max(l[0])-min(l[0])+1
      for i in range(height):
          for j in range(widht):
              if (i,j) in plot:
                  s += &quot;*&quot;
  </code></pre>
  <p>I have tried to add line after line to a empty string, and my thought is to check if the next coordinate in the for loops are in the argument <code>plot</code> and if not, if it is the frame or the inside of the frame.</p>