Skip to content

Commit 385a03c

Browse files
committed
starting question 3
1 parent ff1a327 commit 385a03c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

anwers/lvl_1/question_3.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Question 3
2+
# Level 1
3+
4+
# Question:
5+
# With a given integral number n, write a program to generate a dictionary that contains (i, i*i) such that is an integral number between 1 and n (both included). and then the program should print the dictionary.
6+
# Suppose the following input is supplied to the program:
7+
# 8
8+
# Then, the output should be:
9+
# {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64}
10+
11+
# Hints:
12+
# In case of input data being supplied to the question, it should be assumed to be a console input.
13+
# Consider use dict()
14+

0 commit comments

Comments
 (0)