11 Answers
New AnswerThe answer is 42. I just wanna know how to get to it because I have this worksheet with a bunch of while loops problems but I don’t know how to do them without checking with python. Could you please show me the steps to it?
z = 2 sum = 0 while z<9: print("z:",z,"\nsum:",sum,"\nz+=1: ", z+1, "\nsum+z: ",sum+(z+1),"\n----\n") z += 1 sum=sum+z print (sum)
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message