What would be the output of the below code?
fruits = ["Robert","Karamagi", ""]fruits.remove("Robert")print(fruits)
A. RobertB. ['Karamagi', '']C. ["Robert","Karamagi"]D. ["Robert"]
What does the following code print to the console.
bases = ["first", "second", "third", "fourth"]bases.remove("fourth")print(bases)
A. ['first', 'second', 'third']B. ['first']C. ['first', 'second']D. ["second", "third", "fourth"]
Which type of elements are accepted by random.shuffle()?
a) stringsb) listsc) tuplesd) integers
What will be the output of the following Python code?
x = ['ab', 'cd']for i in x: i.upper()print(x)
a) [‘ab’, ‘cd’]b) [‘AB’, ‘CD’]c) [None, None]d) none of the mentioned
What will be the output of the following Python code?
def increment_items(L, increment): i = 0 while i < len(L): L[i] = L[i] + increment i = i + 1 values = [1, 2, 3]print(increment_items(values, 2))print(values)
a) None [3, 4, 5]b) None [1, 2, 3]c) [3, 4, 5] [1, 2, 3]d) [3, 4, 5] None
Match the following reflexes to their response.
What will the output be after executing the following code?
fruits = ["apples","bananas"]for i in range(1,2): for fruit in fruits: print(i, fruit)
A.applesbananas
B. error
C.1 apples1 bananas
D.1 apples2 bananas
Identify the region of the model indicated by the letter G.