Search Header Logo

listy python-test

Authored by Wacłąw Świdrak

Computers

1st Grade

Used 6+ times

listy python-test
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mamy daną listę zdefiniowną kodem w Pythonie:

t = [2, 4, 8, 16, 32]; Jaką wartość ma t[-1]?

0

zachowanie takiej operacji jest niezdefiniowane

2

32

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mamy daną listę zdefiniowaną kodem w Pythonie:

t = [ 'o', 'j', 'a', 'i', 'k' ]. Jakie słowo będzie

utworzone po złączeniu w jedno słowo wartości z listy

t[-1], t[3], t[1]?

m a i

k i j

o i j

i k a

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lista tab rozmiaru 3000 jest wypełniona kolejnymi

liczbami parzystymi, przy czym tab[0] = 2, tab[1] = 4,

itd. Jaka wartość znajduje się pod indeksem 2019?

2019

4036

4040

4121

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Chcemy posortować wszystkie elementy listy tab rosnąco. W języku Python zrobimy to:

tab.sort()

sort(tab)

sort(tab, tab+len(tab))

tab = sorted(tab)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Co zwróci L1[-3:-1] gdy L1 = [2, 'Jan Kowalski', 5, 3.14, 'Alina Kowalska']

['Jan Kowlaski', 5, 3.14]

Element startowy i końcowy nie mogą być liczbami ujemnymi

[5,3.14]

[]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Pod jakim indeksem znajduje się ostatni element listy zadeklarowanej kodem w języku Python tablica = [1, 2, 3, 4, 5, 6]

4

5

6

7

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Chcemy posortować wszystkie elementy listy tab malejąco. W języku Python zrobimy to

lista.sort(reverse)

lista.sort(reverse=True)

lista.sort(reverse=False)

lista.sort(True)

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?