n = 10
x = 4
found = False # This bool will become true once x in found
for i in range(0, n):
if x == i:
found = True
print("Number found")
break
else:
print("Number not found")
What is the i+1 for? Just why the i+1? why not just “i”?
Type your question above this line.
Course: https://www.educative.io/collection/10370001/5473789393502208
Lesson: https://www.educative.io/collection/page/10370001/5473789393502208/4640037261541376