The
while True line always evaluates to
True so the loop keeps repeating. To run that code a set number of times you could use a
for loop or have an expression following
while that evaluates to
False after several loops. Try replacing:
with:
Code:
for i in range(1,5):
print 'start trial {}'.format(i)