Python script to generate and print a dictionary that contains a number (between 1 and n) in the form (number, square of number)
n=int(input('Enter Any number ?'))
d=dict()
for i in range(1,n+1):
print(d.update({i:i*i}))
n=int(input('Enter Any number ?'))
d=dict()
for i in range(1,n+1):
print(d.update({i:i*i}))
Comments
Post a Comment