logo

Crowdly

Browser

Add to Chrome

Questions Bank (1239069 total)

What would be the output of the below code?

fruits = ["Robert","Karamagi", ""]

fruits.remove("Robert")

print(fruits)

A. Robert

B. ['Karamagi', '']

C. ["Robert","Karamagi"]

D. ["Robert"]

View this question

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"]

View this question

Which type of elements are accepted by random.shuffle()?

a) strings

b) lists

c) tuples

d) integers

View this question

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

View this question
Thunderstorms play ___ with the power supply to the town.
0%
0%
100%
0%
View this question

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

View this question

Match the following reflexes to their response.

View this question
A supervolcano eruption could threaten the ___ of our planet.
0%
0%
100%
0%
View this question

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.

apples

bananas

B. error

C.

1 apples

1 bananas

D.

1 apples

2 bananas

View this question

Identify the region of the model indicated by the letter G.

View this question