Python Forum
How would I go about repeating/looping this code?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How would I go about repeating/looping this code?
#6
Hey, sorry for the late response. I ended up finding the fix so I thought I'd leave it here in case anyone else has the same issue as me.

for row, token in moves: 
        if row == 'a':  
         goto (-300,row_a_y_cord[0]) 
         del row_a_y_cord[0] 
        if token == 1: 
         dot(10, "red")
        elif token == 2:
         dot(10, "blue")
        elif token == 3:
         dot(10, "yellow")
        elif token == 4:
         dot(10, "green")

Turns out just using the list itself with the loop will loop it correctly
Reply


Messages In This Thread
RE: How would I go about repeating/looping this code? - by azulu - Mar-23-2020, 02:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  repeating pastakipp 1 1,615 Oct-24-2020, 03:28 PM
Last Post: jefsummers
  Python code isn't looping player turns Reta 7 3,774 May-19-2019, 02:27 PM
Last Post: SheeppOSU

Forum Jump:

User Panel Messages

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