Define a function to generate a dictionary that contains all numbers (from 1 to n) in the form (x, x*x).
Define a function that takes a positive integer as an argument. The function should return a dictionary that contains all the numbers and their squares as key-value pairs.
Example:
Input:
4
Output:
{1: 1, 2: 4, 3: 9, 4: 16}