9. Problem to print squares of even numbers from a list.

In this program, we will take a user input as a list and print squares of even numbers from that list with the help of the below-given steps.

Squares of even numbers:

Steps to solve the program
  1. Take a list as input.
  2. Using for loop check whether an element from the list is even or not.
  3. If an element is even then print its square using **n.

Output :

Related Articles

Combination of 2 elements from the list whose sum is 10.

split the list with even,odd values

Leave a Comment