Question: Create a list with all numbers from 0 to 10. then, make sure to print this list. Create a logic to print only the even

Create a list with all numbers from 0 to 10. then, make sure to print this list.

Create a logic to print only the even numbers from the list you have created in the previous question. *hint: use loops and if/else statements.

A number is divisible by 2 if the reminder, when divided by 2, is 0: in Python notation, number % 2 == 0 returns True if the number if even, and False otherwise.

Create a list containing the square of each number in the list created in Q1. hint: start with an empty list and use a for loop to append squares to this list.

Plot the list of squares created in the previous question.

python pandas

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!