Define a function that can print a dictionary where the keys are numbers between 1 and 3 (both included) and the values are squares of keys.
- Use dict[key]=value pattern to put entry into a dictionary.
- Use the ** operator to get the power of a number.
Code language: Python (python)
def printDict(): d=dict() d=1 d=2**2 d=3**2 print d printDict()