lstx=[]
lsty=[]
num = int(input('How many numbers: '))
for i in range(num):
x = int(input('Enter number '))
lstx.append(x)
y=x**2
lsty.append(y)
pl.plot(lstx,lsty)
pl.show()
Input
How many numbers: 3
Enter number 1
Enter number 2
Enter number 3
No comments:
Post a Comment