Question: python coding involving loops and lists. Need help. My professor has me completely confused. Thank you in advance. def loop_with_for(my_list): Use for loop to

python coding involving loops and lists. Need help. My professor has me completely confused. Thank you in advance. def loop_with_for(my_list): """  Use for loop to access all the items in a list:  Finish the function below which takes a list as parameter and prints the items in the list with a for loop.  You do not need to worry about nested lists.  There is no explicit return value of this function.  """  #test new_list = [1,2,3,4] loop_with_for(new_list) print("--"*10) 

___________________________________________________________________________________________________

def loop_with_while(my_list): """  Use while loop to access all the items in a list:  Finish this function below which takes a list as parameter and prints the items in the list with a while loop.  You do not need to worry about nested lists.  There is no explicit return value of this function.  """ 
#test loop_with_while(new_list) print("--"*10) 

___________________________________________________________________________________________________

def double_one_skip_one(list_param): """  Double one skip one:  Finish this function below which takes a list of numbers, and double the values with even indexes only.  You can assume that all the items inside the list are numbers.  You should return the list with the values all doubled.  """ 
#test new_list = [1,2,3,4] another_list = [7.77,10, 12.345] print(double_one_skip_one(new_list)) print(double_one_skip_one(another_list)) print("--"*10) 

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!