Dictionary of Squares (Problem 9) - InfyTQ Solution in Python
Dictionary of Squares (Problem 9)
InfyTQ Solution in Python
PROBLEM STATEMENT
Write a Python function which generates and returns a dictionary where the keys are numbers between 1 and n (both inclusive) and the values are square of keys.
Sample Input | Expected Output |
---|---|
10 | {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81, 10: 100} |
SOLUTION
SHARE
If you find this useful, please share with your friends and Community.
CODE TOGETHER..GROW TOGETHER.
CODE TOGETHER..GROW TOGETHER.
Newer Posts
Newer Posts
Older Posts
Older Posts
Comments