All Questions



Question about the parameter practices

How come this code creates 2 different shapes? The instructions are enough for just one. I also dont understand why the length/height changes, is it because its pre coded?

  • Nathan Lovato replied

    Your code is a function definition, so by itself, it doesn't do anything. It just defines a function named draw_rectangle() that you can call as often as you want to draw many rectangles.

    Then, the app calls the function twice to ensure that your function works as intended. We currently don't show the calling code but we would like to display it at some point. Doing that requires quite a bit of work, it's very low priority at the moment.