Sunday, March 3, 2019

Square of Every Number using list - Python3

a=[]
b=[]
n=int(input("Enter the size of list:"))
for i in range(n) :
    x=int(input("Enter the value: "))
    a.append(x);
    b.append(x**2)
print("Original list:",a)
print("Square of every number in list:",b)


ScreenShot:



No comments:

Post a Comment