LearnPy Hub
← Dictionaries problems
Easy

Squares Dictionary

Read n and print a dictionary mapping each number from 1 to n to its square.

Input

One integer n ≥ 1.

Output

A dictionary.

Sample 1

Input
3
Output
{1: 1, 2: 4, 3: 9}

Sample 2

Input
1
Output
{1: 1}
solution.py
Output appears here
Squares Dictionary · Python practice problem · LearnPy Hub