logo

Crowdly

Programación 1B (Rojero LMiV)

Шукаєте відповіді та рішення тестів для Programación 1B (Rojero LMiV)? Перегляньте нашу велику колекцію перевірених відповідей для Programación 1B (Rojero LMiV) в moodle.ulsachihuahua.edu.mx.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop()?

a) [3, 4, 5, 20, 5, 25, 1]

b) [1, 3, 3, 4, 5, 5, 20, 25]

c) [3, 5, 20, 5, 25, 1, 3]

d) [1, 3, 4, 5, 20, 5, 25]

Переглянути це питання

Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?

a) Error

b) None

c) 25

d) 2

Переглянути це питання

What will be the output after running the following code?

def func(mylist):

    mylist[3]="strawberries"

lst = ["bananas","apples","pears","peas"]

func(lst)

print(lst)

A. ['bananas', 'apples', 'strawberries', 'peas']

B. ['bananas', 'apples', 'pears', 'strawberries']

C. ['bananas', 'apples', 'strawberries']

D. ['strawberries', 'strawberries', 'strawberries']

Переглянути це питання

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

Переглянути це питання

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) strings

b) lists

c) tuples

d) 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

Переглянути це питання

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

Переглянути це питання

What does the following code print to the console.

letters = ["b", "a", "y", "a"]

index = letters.index("a")

print(index)

A. 2

B. 1

C. 0

D. 3

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.ulsachihuahua.edu.mx?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!