Python breaks for a certain amount
- by Brian Cox
All,
I am not very good at explaining so i will let my comments do it!
#this script is to calculate some of the times table up to 24X24 and also miss some out
#Range of numbers to be calculated
numbers=range(1,25)
for i in numbers:
for w in numbers:
print(str(i)+"X"+str(w)+"="+str(i*w))
#here i want to break randomly (skip some out) e.g. i could be doing the 12X1,12X2 and then 12X5 i have no limit of skips.
Update
Sorry if this is not clear i want it to break from the inner loop for a random amount of times