D | What is the error of the following? Predict the output
i = 1 while True: if i% 7 == 0:
break print(i)
i + = 1 Answer: 1 2 3 4 5 6 i = 1 while True:
if i%7 == 0:
break print(i) i += 1
Answers
Answered by
0
Answer:
Output is 1 2 3 4 5 6
Answered by
1
Answer:
i = 1
while True:
if i% 7 == 0:
break
print(i)
i = i+1
Explanation:
if u run the above code it prints
1
2
3
4
5
6
Maybe indentation is the error .
Similar questions