You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
207 B
Python

# Python script to generate and print a dictionary that contains a number (between 1 and n) in the form (x, x*x)
n=int(input())
d = dict()
for x in range(1,n+1):
d[x]=x*x
print(d)