Android & iPhone apps are coming soon. Log in for a plan and reminders made for you →

Coding basics · 19 of 20

Square every number

Return a new list with each number squared, in the same order.

Examples

Input nums = [1, 2, 3]

Output [1, 4, 9]

Input nums = [-4, 0, 5]

Output [16, 0, 25]

Your code · Python

Stuck?