Write a program to display the numbers 1, 4, 9, 16 ........ n terms.
Program:
n=int(input("Enter limit"))
for x in range(1,n+1):
v=(x*x)
print(v)
n=int(input("Enter limit"))
for x in range(1,n+1):
v=(x*x)
print(v)
In this Python Tutorial you can get update about the Python Programming language. You will know about scope of Python, Interview questions, all basic and advanced topics of Python.
Comments
Post a Comment
If you have any doubt, Please let me know..