Discover answers to your most pressing questions at Westonci.ca, the ultimate Q&A platform that connects you with expert solutions. Join our platform to connect with experts ready to provide accurate answers to your questions in various fields. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.

28. Which method or operator can be used to concatenate lists? A. B. + C. % D. concat 29. What will be the value of the variable list after the following code executes? list = (1, 2, 3, 4] list[3] = 10 A. [1, 2, 3, 10] B. [1, 2, 10, 4] C. [1, 10, 10, 10] D. Nothing; this code is invalid 30. Consider the following list: inventory = ["washer", "dryer", "microwave") Which of the following will display the item value, "dryer"? A. print(inventory[0]) B. print(inventory(1) C. print(inventory[2]) D. printinventory(-1)) 31. What will be the value of the variable list2 after the following code executes? list1 = [1, 2, 3] list2 = 0 for element in list1: list2.append(element) list1 = [4, 5, 6] A. [4, 5, 6] C. (1,2,3,4,5,6] B. (1, 2, 3] D. None of the above 32. Given that: aList = [1,2,3,4] which of the following will display the list [2,3,4] at the screen? A. print(aList[1:3]) B. print(aList[2:41) C. print(aList[2:1) D. print(aList[-3:]) 33. Given that: aList = [1,2,10,11,12,13] del aList[3] what will be printed by print (aList) A. [1,2,11,12,13] C. [1,2,10,12,13] B. (1,10,11,12,13] D. (1,2,10,11,13] 34. Given that: my_tools = ['hammer', 'screwdriver', 'wrench', 'pliers', 'nailer', 'table saw') my_tools[2:4]= ['chainsaw', 'chipper'] what will be printed by print (my_tools) A. ['hammer','chainsaw', 'chipper','screwdriver','wrench','pliers', 'nailer', 'table saw'] B. ['hammer','screwdriver', 'wrench', 'chainsaw', 'chipper', 'nailer', 'table saw') C. ['hammer','screwdriver', 'chainsaw','chipper', 'nailer', 'table saw'] D. ['hammer',chainsaw', 'chipper','pliers', 'nailer', 'table saw') 35. Given the following list: Names = ['Dan', 'Mary', 'Bill', 'Juanita', 'Harry', 'Sarah'] Which of the following will change the list names to ['Dan', 'Mary', Juanita', 'Harry', 'Sarah') ? A. del Names[3] B. erase('Bill') C. Names.pop('Bill') D. Names.pop(-4) E. Names.insert(2, nothing)

Sagot :

Thank you for your visit. We are dedicated to helping you find the information you need, whenever you need it. Thank you for visiting. Our goal is to provide the most accurate answers for all your informational needs. Come back soon. Thank you for trusting Westonci.ca. Don't forget to revisit us for more accurate and insightful answers.