
PE1_module 4_test
Quiz
•
Education
•
University
•
Practice Problem
•
Medium
Ngoc Phan
Used 5+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đáp án nào định nghĩa đúng hàm fun có hai tham số, có giá trị ban đầu đều là 0?
def fun (a=b=0) :
def fun (a=0, b=0) :
fun fun (a=0, b) :
fun fun (a, b=0) :
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn mã sau là gì?
def fun(x):
... if x % 2 == 0:
... ... return 1
... else:
... ... return 0
print(fun(fun(2)) + 1)
1
None
the code will cause a runtime error
2
1
2
None
sẽ báo lỗi khi chạy lệnh
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Phát biểu nào đúng? (Chọn 2 đáp án)
Giá trị None có thể được gán cho biến
Giá trị None không được sử dụng bên ngoài hàm
GIá trị None có thể được sử dụng như là một tham số của các toán tử số học
Giá trị None có thể được so sánh với các biến
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn mã sau sẽ xuất ra giá trị nào?
def func_1(a):
return a ** a
def func_2(a):
return func_1(a) * func_1(a)
print(func_2(2))
2
4
16
báo có lỗi
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chèn dòng mã lệnh nào dưới đây vào chỗ "#chèn câu lệnh của bạn" để có kết quả xuất ra là:
a
b
c
dictionary = {}
my_list = ['a', 'b', 'c', 'd']
for i in range(len(my_list) - 1):
dictionary[my_list[i]] = (my_list[i], )
for i in sorted(dictionary.key()):
k = dictionary[i]
# Insert your code here.
print(k["0"])
print(k)
print(k[0])
print(k['0'])
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn mã sau:
def func(a, b):
... return a ** b
print(func(2,2))
báo lỗi
sẽ xuất ra 2
sẽ xuất ra 4
sẽ trở lại None
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
def fun(inp=2, out=3):
... return inp * out
print(fn(inp =3))
9
4
6
8
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
Already have an account?
Similar Resources on Wayground
21 questions
Advertising
Quiz
•
University
18 questions
HỘI THI TRÍ TUỆ - BỘ CÂU HỎI 40 ĐIỂM
Quiz
•
University
18 questions
LT Tham vấn trị liệu BTCN1
Quiz
•
University
16 questions
facilitate learning L1Educational Support Worker Quiz
Quiz
•
11th Grade - University
25 questions
Chương 3: CNXH và thời kỳ quá độ lên CNXH
Quiz
•
University
15 questions
Data Structures Training Quiz2
Quiz
•
University
15 questions
Productivity tools
Quiz
•
University
15 questions
Setting the Stage for Possitive Behaviour
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Education
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
