Apple interview question

different question: Write a code, which performs the '7 boom' game.

Interview Answer

Anonymous

11 Sept 2019

for x in range(100): - if x %7 ==0: print('boom') elif x>10 and int(x/10)%7==0 or x%10==7 : print('boom') else: print(x)