question archive Write a Python function q1a_func with the following def line: def q1a_func(a_list,a,b): where The input a_list is a Python list whose entries are of the type int

Write a Python function q1a_func with the following def line: def q1a_func(a_list,a,b): where The input a_list is a Python list whose entries are of the type int

Subject:Computer SciencePrice: Bought3

Write a Python function q1a_func with the following def line: def q1a_func(a_list,a,b): where

  • The input a_list is a Python list whose entries are of the type int. You can assume that a_list is non-empty.

  • The inputs a and b are of the type int. You can assume that the value of a is less than that of b.
  • The function is required to return a value of the bool type.
  • The function q1a_func should return the bool value True if all the entries in a_list are greater than or equal to a and less than b; otherwise the function should return False. For example,
  • • If a_list is [10,5,12], a is 5 and b is 13, then q1a_func should return True.
  • • If a_list is [10,5,12,11], a is 5 and b is 12, then q1a_func should return False. • If a_list is [10,5,12,11], a is 6 and b is 13, then q1a_func should return False. 

 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE