
Ktra TX_tin 10_l2
Authored by Vi Thị Chiến
Computers
Professional Development
Used 12+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Giá trị của x, y là bao nhiêu khi thực hiện lệnh f(1, 3)
>>> x, y = 3, 4
>>> def f(x, y):
x = x + y
y = y + 2
return x
2,3
3,4
4,5
5,4
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
“Trong Python tất cả các biến khai báo bên trong hàm đều có tính …, không có hiệu lực ở bên … hàm”.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Nếu muốn biến bên ngoài vẫn có tác dụng bên trong hàm thì cần khai báo lại biến này bên trong hàm với từ khoá nào?
global
def
int
out
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của chương trình sau là:
def add(x,y):
print(x+y)
x=15
add(x ,10)
add(x,x)
y=20
add(x,y)
25,35,30
25,30,35
35,30,25
chương trình bị lỗi
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chương trình sau thông báo lỗi gì?
for i in range(10) print(i)
TypeError
NameError
SyntaxError
ValueError
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chương trình sau thông báo lỗi gì?
n = 5
for i in range(n):
prin(t)
Type Error
NameError
SyntaxError
ValueError
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chương trình sau thông báo lỗi gì?
lst = [1, 2, 3, 4, 5]
for i in range(10):
print(lst[i])
ValueError
SyntaxError
NameError
IndexError
Access all questions and much more by creating a free account
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?