Skip to content

Commit 374a126

Browse files
committed
Write a program to create a dictionary that contains (i, i*i) such that i is an integral number between 1 and n (both included)
1 parent dbf453b commit 374a126

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

39.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
n = 5
2+
dictionary = {}
3+
4+
for i in range(1, n+1):
5+
dictionary[i] = i*i
6+
7+
print("The dictionary is:",dictionary)

0 commit comments

Comments
 (0)