Skip to main content
3 of 8
added 432 characters in body
TFeld
  • 19.9k
  • 3
  • 20
  • 63

Python 3, 92 bytes

def f(n): 
 for i in range(n):print('Yeah\n'*(i%3<1)+'But\n'*(i%2<1)+'No\n'*(i%3==1),end='')

Try it online!

Python 2, 97 95 bytes

for i in range(input()):
 for w,x in[('Yeah',i%3<1),('But',i%2<1),('No',i%3==1)]:
	if x:print w

Try it online!

TFeld
  • 19.9k
  • 3
  • 20
  • 63