Tce Code War

Tce Code War

University

15 Qs

quiz-placeholder

Similar activities

Examen Parcial de Modelación y Simulación Ambiental

Examen Parcial de Modelación y Simulación Ambiental

University

20 Qs

Quiz on Beam Bearing Plates and Column Base Plates

Quiz on Beam Bearing Plates and Column Base Plates

University

20 Qs

Post-Test Webinar ISO 14001:2015

Post-Test Webinar ISO 14001:2015

University

15 Qs

Bài tập: Tìm hình chiếu cạnh

Bài tập: Tìm hình chiếu cạnh

University

10 Qs

2DO PARCIAL FUNDAMENTOS DE INVESTIGACIÓN

2DO PARCIAL FUNDAMENTOS DE INVESTIGACIÓN

University

11 Qs

Parameter Pemotongan

Parameter Pemotongan

University

15 Qs

LinkedIn Engagement Strategies Quiz

LinkedIn Engagement Strategies Quiz

University

18 Qs

Evaluación diagnostica de Postcosecha

Evaluación diagnostica de Postcosecha

University

15 Qs

Tce Code War

Tce Code War

Assessment

Quiz

Engineering

University

Practice Problem

Hard

Created by

Neela G

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the code ?

def f(x, y=[]):

y.append(x)

return y

print(f(1))

print(f(2))

[1] [2]

[1] [1, 2]

[1, 2] [2]

Error

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the code?

x = [1, 2, 3]

y = x[:]

y[0] = 99

print(x[0], y[0])

1 99

99 1

99 99

Error

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of code ?

def func(a, b=2, c=3):

print(a, b, c)

func(5, c=10)

5 2 10

5 2 3

5 2 5

error

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the code below?

a = [1, 2, 3]

print(a * 2)

[1, 2, 3, 1, 2, 3]

[2, 4, 6]

[1, 2, 3, 2]

Error

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Choose the output for the code below

print([i for i in range(3)])

print((i for i in range(3)))

[0, 1, 2] [0, 1, 2]

0 1 2

[0, 1, 2] <generator object>

[1 2]

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following code?

x = [1, 2, 3]

print(x is x[:])

True

False

Error

1 2 3

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Choose the output for the code

a = ([])

for i in range(3):

a.append(i)

print(a)

[1 2 3]

[0 1]

[0, 1, 2]

0 1 2

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?