Sort by

recency

|

1759 Discussions

|

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

    if name == 'main': n = int(input())

    for i in range(n):
        print(i**2)
    
  • + 1 comment

    what's wrong with this code?

    i = 0 while True: if(i

  • + 0 comments

    Easy Simple Solution

    # This line ensures the code runs only when the script is executed directly (not when imported as a module)
    if __name__ == '__main__':
        
        # Read an integer from the user input
        n = int(input())
        
        # Loop from 0 to n-1
        for i in range(n):
            
            # Print the square of the current number
            print(i * i)
    
  • + 0 comments

    i = 0 j = int(input()) k = 0 while (i < j): k = i * i i += 1 print(k)