Python says it has a syntax error in this line " elif (i%7==0) or str.count(str(i),'7')>0: " and I cannot figure it out. I'm new to Python so it must be something simple.
k=int(input("enter the value for k:")) n=int(input("enter the value for n:")) if k>=1 and k<=9: for i in range(1,n+1): if (i%7==0) and str.count(str(i),'7')>0: print("boom-boom!") elif (i%7==0) or str.count(str(i),'7')>0: print("boom") else: print(i)
elifandelseshould be indented at the same level asif