Sort by

recency

|

1672 Discussions

|

  • + 0 comments
    if __name__ == '__main__':
        n = int(input())
        [print(i ** 2) for i in range(0, n)]
    
  • + 0 comments

    Python Solution:

    n = int(input())
    for i in range(0,n):
        print(i**2)
    
  • + 0 comments

    i=0 while i

  • + 0 comments
    for i in range(n):
    	print(i**2)
    

    range(n) generates a sequence of integers starting from 0 up to, but not including, n so it'll all be non-negative

  • + 0 comments

    n=int(input()) for i in range(0,n): print(i*i)