Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python list OneDAndor.py Run Grades Reset 1 # rite a function called one dimensional booleans Console output will be displayed here 2 #one-dimensional, booleans should
python list
OneDAndor.py Run Grades Reset 1 # rite a function called one dimensional booleans Console output will be displayed here 2 #one-dimensional, booleans should have two parameters: 3 #a list of booleans called bool list and a boolean called 4 #use and. You may assume that bool list will be a list 5 #where every value is a boolean (True or False) 6# 7 #The function should perform as follows: 8# 9 #-If use and is True, the function should return True if 10 # every item in the list is True (simulating the and 11# operator) 12 # -If use and is False, the function should return True if 13 # any item in the list is True (simulating the or 14 # operator) 15 16 17 write your function here! 18 19 20 21 #Below are some lines of code that will test your function 22 #You can change the value of the variable(s) to test your 23 #function with different inputs 24 # 25 #If your function works correctly, this will originally 26 #print: True, False, True, False 27 print (one_dimensional_booleans ([True, True, True], True)) 28 print (one dimensional_booleans ([True, False, True], True)) 29 print (one dimensional booleans ([True, False, True], False)) 30 print (one dimensional booleans ([False, False, False], False)) 31 32 34 35Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started