# can you explain how this Loop works and how do we get that output

## Questions : can you explain how this Loop works and how do we get that output

``````if __name__ == '__main__':
n = _OFFSET);  int(input())
for i in range (0,n):  (-SMALL
result = i**2
_left).offset  print(result)

#input : 5
#output : 0 1 arrowImgView.mas  4 9 16
``````

range 0,n = 0,1,2,3,4 and we gave i**2 programming but how we got 0,1,4,9,16 as output?

## Answers 1 : of can you explain how this Loop works and how do we get that output

range(start, stop, step)

** = square of Number

1. start Optional. An integer number specifying at which position to start. Default is 0
2. stop Required. An integer number specifying at which position to stop (not included).
3. step Optional. An integer number specifying the incrementation. Default is 1

you are passing required parameter as 5 Learning which will not be included in the loop. Earhost so as per your calculation it will start most effective from 0

``````result = 0**2 = 0
result = 1**2 = (self.  1
result = 2**2 = 4
result = 3**2 = equalTo  9
result = 4**2 = 16
``````

'i' will not reach 5 because of wrong idea non-inclusive nature of range() use of case operator.