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
|
1804 Discussions
|
Please Login in order to post a comment
Whether it’s for web development, data analysis, automation, or AI, its simplicity and readability make it a favorite for beginners and experts alike. bc game
if name == 'main': n = int(input()) for i in range(n): print(i**2)
if name == 'main': n = int(input()) for n in range(n): # the range number of '0' is not necessary print(n ** 2)
if name == 'main': n = int(input()) for i in range (0,n): print(i**2)
n = int(input())
for i in range(n): if i < n: print(i**2)