Python

Python

11th Grade

10 Qs

quiz-placeholder

Similar activities

Ôn tập HKI Công nghệ - Khối 4

Ôn tập HKI Công nghệ - Khối 4

4th Grade - University

10 Qs

UH 1 Basis Data - 2425

UH 1 Basis Data - 2425

11th Grade

15 Qs

Quiz sobre Hardware e Software

Quiz sobre Hardware e Software

2nd Grade - University

15 Qs

Tes Perkembangan Revolusi Industri

Tes Perkembangan Revolusi Industri

5th Grade - University

10 Qs

KABEL STRAIGHT & CROSS

KABEL STRAIGHT & CROSS

11th Grade

15 Qs

2.4 Layer 2 Devices

2.4 Layer 2 Devices

9th - 12th Grade

12 Qs

Tin 7 Bài 8

Tin 7 Bài 8

7th Grade - University

10 Qs

Game interaktif

Game interaktif

11th Grade

10 Qs

Python

Python

Assessment

Quiz

Information Technology (IT)

11th Grade

Practice Problem

Hard

Created by

Fatima Campos

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

  1. 1. Para acrescentar o valor 10 ao fim da lista L, usa-se:

L.add(10)

L.append(10)

L.push(10)

L.extend(10)

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

  1. 2. Assinale a verdadeira:

A) Tuplas são mutáveis.

B) Listas não permitem valores repetidos.

C) Conjuntos não mantêm ordem e não permitem repetidos.

D) Conjuntos são indexáveis por posição.

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

  1. 3. Dado x = [1, 2, 3]; após x.append([4, 5]), qual o valor de len(x)?

3

4

5

6

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

  1. 4. O que imprime?

  2. t = (1, [2, 3], 4)

    t[1].append(5)

    print(t)

(1, [2, 3], 4)

(1, [2, 3, 5], 4)

Lança erro por tuplas serem imutáveis

(1, 2, 3, 5, 4)

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

  1. 5. Qual destas remove duplicados preservando a ordem de L?

list(set(L))

sorted(set(L), key=L.index)

list(dict.fromkeys(L))

[x for x in set(L) if L.count(x) == 1]

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

  1. 6. Dado nums = [1,2,2,3], qual o resultado de {x**2 for x in nums if x % 2 == 0}?

{4, 4}

{2, 2}

{4}

{4, 16}

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

  1. 7. O que acontece?

s = {1, 2}

s.update([3, 4])

s.add([5])

s torna-se {1,2,3,4,5}

s torna-se {1,2,3,4,[5]}

s.add([5]) lança TypeError

s.update([3,4]) lança TypeErro

Create a free account and access millions of resources

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?