Question: plz answers these short Qs in python language Q1-Given the list my_list containing integers, create a list consisting of all the even elements of my_list.
plz answers these short Qs in python language
Q1-Given the list my_list containing integers, create a list consisting of all the even elements of my_list. Associate the new list with the variable new_list.
Q2-Create a list consisting of the negative values in the list numbers. Associate the new list with the variable negatives.
Q3-The factors of an integer are those numbers that evenly divide into the integer. Given the integer n, create a list of all the factors of n, excluding 1 and n itself. The list should be ordered from smallest to largest. Associate the new list with the variable factors.
Q4-The factors of an integer are those numbers that evenly divide into the integer. Given the integer n, create a list of all the factors of n, excluding 1 and n itself. Associate the new list with the variable factors. The list should be ordered from largest to smallest.
Step by Step Solution
There are 3 Steps involved in it
Lets tackle each question step by step Q1 Even Elements of a List To create a list of all even eleme... View full answer
Get step-by-step solutions from verified subject matter experts
