Python Forum
Nested while loop problem + turtle
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nested while loop problem + turtle
#3
(Jul-06-2019, 11:27 AM)ichabod801 Wrote: You need to reset y to 0. When x is 0 and y reaches img.size[1], the inner loop ends. Then x is incremented, and it checks the inner loop's condition again. But since you didn't reset y, it skips the loop and increments x again, until the outer loop is done. So when you increment x, reset y.

Ohhh right. I forgot about that!

Thanks.
Reply


Messages In This Thread
RE: Nested while loop problem + turtle - by DreamingInsanity - Jul-06-2019, 12:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Photo Problem installing turtle MasterJediKnight7 17 24,696 Mar-18-2024, 10:22 AM
Last Post: bmohamadyar313
  While Loop Problem Benno2805 1 587 Sep-06-2023, 04:51 PM
Last Post: deanhystad
  Big O runtime nested for loop and append yarinsh 4 1,396 Dec-31-2022, 11:50 PM
Last Post: stevendaprano
  Nested for loops - help with iterating a variable outside of the main loop dm222 4 1,605 Aug-17-2022, 10:17 PM
Last Post: deanhystad
  Loop reading csv file problem faustineaiden 1 1,578 Dec-11-2021, 08:40 AM
Last Post: ibreeden
  Problem with nested JSON Kalet 7 2,811 Dec-09-2021, 11:13 PM
Last Post: Gribouillis
  How do I add another loop to my nested loop greenpine 11 4,578 Jan-12-2021, 04:41 PM
Last Post: greenpine
  Error on nested loop : Invalid syntax dvazquezgu 3 3,244 Nov-25-2020, 10:04 AM
Last Post: palladium
  Infinite loop problem Zirconyl 5 3,003 Nov-16-2020, 09:06 AM
Last Post: DeaD_EyE
  Nested function problem chipx 8 3,500 Oct-21-2020, 11:56 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020