We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2efb81b commit c39f2d5Copy full SHA for c39f2d5
my_exercises/question_3.py
@@ -19,4 +19,15 @@
19
# In case of input data being supplied to the question, it should be assumed to be a console input.
20
# Consider use dict()
21
#
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