QUESTION DESCRIPTION
Python Program to Generate a Dictionary that Contains Numbers (between 1 and n) in the Form (x,x*x).
Python Program to Generate a Dictionary that Contains Numbers (between 1 and n) in the Form (x,x*x).
a=int(input())
di={}
for i in range(1,a+1):
di[i]=i*i
print(di)
Comments
Post a Comment