Robotics & Artificial Intelligence

To find the sum of whole numbers up to 10, a loop runs:

  1. once
  2. ten times
  3. eleven times
  4. any number of times

Python Control Flow

1 Like

Answer

eleven times

Reason — Whole numbers start from 0. Therefore, the whole numbers up to 10 are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, which makes a total of 11 numbers. Hence, the loop runs eleven times.

Answered By

3 Likes


Related Questions