Random number of times around a loop
Asked by
alan carr
I am trying to create a loop that "loops" a random number of times between x and y
I tried the following -:
import random
random.seed()
t=random.randint(1, 5)
while True:
for x in range(t):
### Loop ###################
#######
Loop
I can get things to work if for "x in range(5) " which will create a 5 x loops but I require a random number of loops.
One additional point is there a way of creating a wait for image x OR y to appear
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- alan carr
- Solved:
- Last query:
- Last reply:
To post a message you must log in.