
Tce Code War
Quiz
•
Engineering
•
University
•
Hard
Neela G
Used 1+ times
FREE Resource
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
PEISS
Quiz
•
University
10 questions
Compiler
Quiz
•
University
14 questions
Electrocardiography Quiz
Quiz
•
University
20 questions
KUIS MATERI POPULASI DAN SAMPEL STATISTIKA
Quiz
•
University
15 questions
Engineering Graphics Unit 1
Quiz
•
University
10 questions
UAS Pemrograman Komputer dan Sistem Otomatisasi
Quiz
•
University
20 questions
Electro 2 PSW 2
Quiz
•
University
10 questions
เกมส์ทายของรางวัล
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Engineering
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
22 questions
FYS 2024 Midterm Review
Quiz
•
University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
12 questions
1 Times Tables
Quiz
•
KG - University
20 questions
Disney Trivia
Quiz
•
University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
