what does while i<n+1 mean in python?
will it perform the loop n times or n+1 times? sorry...im just a little confused..
- mark_pocLv 64 weeks ago
i < n + 1 is simply just a statement. It's a statement saying that i is less than n + 1. It's a statement just like "Today is Tuesday" is a statement. It's either a true statement or a false statement. If it is a true statement then the loop continues, and if it is a false statement or becomes false then the loop aborts.
- keerokLv 74 weeks ago
It will loop until i >= n+1.