We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Introduction
- Loops
- Discussions
Loops
Loops
Sort by
recency
|
1596 Discussions
|
Please Login in order to post a comment
for i in range(n) print(i*i)
I solved this problem by this code, maybe its easy way,
for i in range(0,5): print(pow(i,2))
is not the best but I ddo it
value = int(input()) while value not in range(1,21): value = int(input("read n ")) n = 0 for c in range(0,value): print(n**2) n+=1
if name == 'main': n = int(input()) for i in range(n): print(i ** 2)