LearnPy Hub
← Comprehensions problems
Easy

Square Dictionary

Read n and print a dictionary that maps each number 1 to n to its square, using a dictionary comprehension.

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
Square Dictionary · Python practice problem · LearnPy Hub