Question: Write a function called generate _ evens that returns a list of the even numbers between 1 and 5 0 ( including 5 0 )

Write a function called generate_evens that returns a list of the even numbers between 1 and 50(including 50).
Basically, it should return a list: [2,4,6....all the way up to 50]
Inside the function, you can construct the list using either a loop OR list comprehension.
You do not need to call the function in this exercise, defining it is enough.

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!