python while loop invalid syntax | Sololearn: Learn to code for FREE!


python while loop invalid syntax

its a problem of codewars iam trying to solve the thing is i dont understand why while loop giving an error invalid syntax thanks def moving_average(values,n): lst=[] z=0 if n<=0: return None elif n>len(a): return None else: While True: lst.append(sum(values[z:n])/2) z=z+1 n=n+1 if n>=len(a): break return lst

11/4/2020 11:26:15 AM

Abdul Majeed Faraz

1 Answer

New Answer


hahahahaha i cant stop laughing thanks