Loops hackerrank solution

 Task

The provided code stub reads and integer,n, from STDIN. For all non-negative integers i<n, print i^2.

Input Format

The first and only line contains the integer, n.


Constraints

1<=n<=20

Output Format

Print lines, one corresponding to each.

Sample Input 0

5

Sample Output 0

0

1

4

9

16

 

Code:

if __name__ == '__main__':

    n = int(raw_input())

    for i in range(0,n):

        print i*i;

 




Gaming Mouse with 3.9 to 4.00 rating


       
               

Zinq Technologies 1070 3200 DPI LED Backlight 6 Button USB Gaming Mouse with Nylon Braided Cable (Black)


Rating - 3.9 to 4

Price - 400₹ to 500₹

for latest information click - https://amzn.to/2Ow6dXD


No comments:

Powered by Blogger.