Advertisement
AyanUpadhaya

Print non-negative numbers using for loop | HackerRank Problem Solving

Oct 26th, 2021
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. """
  2. Print non-negative numbers using for loop
  3. Out put should be square of each number in seperate line : i<n , print i square
  4. """
  5. if __name__ == '__main__':
  6.     n = int(raw_input())
  7.    
  8.     #for loop
  9.     for i in range(n):
  10.         print(i**2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement