Script question

Hello,

I need a certain script and I just can’t figure out how to do it.

It’s like this:
I have two possibilities and I need it to come out like so:
every 5th count is the second possibility, the rest of the times it is the first possibility:

so, 1, 2, 3 and 4 are “1” and 5 is “2” then 6, 7, 8 and 9 are “1” again and 10 is “2” again.

And so forth.

Can anyone help me with this?

Thanks in advance,
H34DhUnT3r

modulo seems to do



 
import bpy
 
 
for i in range(0,20):
 
 print ('i=',i,' mod i =',i%5)
 print ()
 
 if i%5==0 :
  print ('i=',i)
  print ()
 
 




happy blendering

or if you wanna do:
1, 2, 3 = True
4, 5 = False
etc.

for i in range(20):
    print(i, i % 5 < 3)