With a given integral number n, write a function to generate a dictionary that contains (i, i*i) such that is an integral number between 1 and n (both included).
- Number should not be less than 0 and should not be greater than 100.
- Calculate square of all number from 1 to n and store in dict.
- Function should pass all test cases.
Instructions:
-
Program should be written in file square_of_numbers.py
-
Function name should be squareOfNumbers.
-
Input
Type: Integer Value: 5
-
Expected Output
Type: Dictionary Value: {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}