title: How to check height and width of drawn rectangle PYTHON
body: <p>I am a student just beginning with Python and I am using JES. What my program does is draw the given amount of rectangles in the parameter with a random random height and width within the given parameter "maxSize", everything is working smoothly however I am trying to check the amount of squares drawn, how can I check to see if the height and width are the same? Should I have used range to create a list instead of using randint? Very confused how I can go about checking the width and height and storing each number in a variable to see if they equal eachother. Sorry if I sound unclear. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>def partB(width,height,numRectangle,maxSize):
      pic = makeEmptyPicture(width,height,black)  
      drawn = 0
      numSquares = 0  
      while drawn &lt; numRectangle:
          from random import randint
          import random
          randomX = randint(0,width)
          randomY = randint(0,height)
          randomSize = randint (0,maxSize)
          widthRect = randomSize
          heightRect = randomSize 
          addRectFilled(pic,randomX,randomY,widthRect,heightRect,red)
          if widthRect == heightRect:
              numSquares+=1
          drawn+=1
      show (pic)</code></pre>
  </div>
  </div>
  </p>