Skip to content

Commit c39f2d5

Browse files
committed
BRUSHED: 3
1 parent 2efb81b commit c39f2d5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

my_exercises/question_3.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,15 @@
1919
# In case of input data being supplied to the question, it should be assumed to be a console input.
2020
# Consider use dict()
2121
#
22-
################################################################
22+
################################################################
23+
24+
from functools import reduce
25+
from typing import Dict
26+
27+
input_str: str = input('input an integer: ')
28+
29+
n: int = int(input_str)
30+
result: Dict = {}
31+
for i in range(1, n+1):
32+
result[i] = i * i
33+
print(result)

0 commit comments

Comments
 (0)