Saturday, September 17, 2016

Blog 7

Tell why this program will not draw 4 diamonds. How do you fix it?




def draw_diamond():
    left(45)
    for i in range(4):
        forward(20)
        left(90)
    right(45)
 
for i in range(4):
draw_diamond()
forward(50)

16 comments:

  1. The commands under "for i in range(4):" are not indented.
    -Katelyn

    ReplyDelete
  2. The second loop is not indented thus it will not loop.
    -Joe Haj

    ReplyDelete
  3. because "draw_diamond()" is not indented
    - Owen Luther

    ReplyDelete
  4. The draw_diamond() and the forward(50) needs to be indented.
    Josh Lee

    ReplyDelete
  5. because draw_dimond() isn't indented. if you indent it, it wiil work

    ReplyDelete
  6. Second loop isn't indented. Alex Haston.

    ReplyDelete
  7. Chris VanYe
    draw_diamond() and forward(50) are not indented

    ReplyDelete
  8. the second loop have a problem and it should be like this
    for i in range(4):
    draw_diamond()
    forward(50)
    Charlie Lin

    ReplyDelete
  9. "for I in range(4)" are not indented.
    -Gary Gao

    ReplyDelete
  10. The second loop needs to be indented
    -Sean

    ReplyDelete
  11. The "for loop" needs to be indented so it's within the inner function scope.

    - Abby Peterson

    ReplyDelete
  12. The second loop first off needs to be indented, and perhaps using a numeral addition function, either found in NumPy, or with the basic python interpreter and the number functions, and add one using a while(n=1).
    - Travis Vonheeder

    ReplyDelete
  13. the second loop is not intended and "for I in range(4)" are not indented.
    lux

    ReplyDelete
  14. because the loop command is not above the draw diomaind command.

    jonathan

    ReplyDelete