Điền vào “…” hoàn thành phát biểu sau: “Chương trình chạy không lỗi ngoại lệ nhưng kết quả đưa ra …. Đây là lỗi … bên trong chương trình.”

bài 29,30

Quiz
•
Computers
•
9th - 12th Grade
•
Easy
Đỗ Hiếu
Used 2+ times
FREE Resource
21 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
A. sai, lôgic.
B. đúng, Syntax Error.
C. đúng, lôgic.
D. sai, ngoại lệ.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Mã lỗi ngoại lệ của lệnh sau là float(“2 + 3”)
A. IndexError.
B. TypeError.
C. ValueError.
D. SyntaxError.
Answer explanation
value là giá trị
value errol lỗi liên quan gtri
float(....) trong ngoặc gọi là giá trị
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Chương trình sau mắc lỗi gì?
#Tính tích của 3 số nguyên dương đầu tiên.
>>>s = 1
>> for i in range(3)
>>>s = s * i
>>>print(s)
0
A. Lôgic.
B. Sai cú pháp.
C. Lỗi ngoại lệ.
D. Không có lỗi.
Answer explanation
chương trình chạy ko lỗi mà kết quả sai
--> lỗi logic
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Chương trình sau thông báo lỗi gì?
for i in range(10) print(i)
A. Type Error.
B. NameError.
C. SyntaxError.
D. ValueError.
Answer explanation
bị sai cú pháp thiếu dấu :
nên suy ra syntaxError là lỗi cú pháp
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Mã lỗi ngoại lệ của lệnh sau là
s = “12” + 12
A. ZeroDivisionError.
B. TypeError.
C. IndentationError
D. SyntaxError.
Answer explanation
type là kiểu dữ liệu
typeError là lỗi kiểu dữ liệu
Sai ở chỗ đang cộng phép toán mà có kí tự " "
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Mã lỗi nào được đưa ra khi lệnh thực hiện phép chia cho giá trị 0
A. ZeroDivisionError.
B. TypeError.
C. ValueError.
D. SyntaxError.
Answer explanation
mẹo nhớ có chữ zero
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Trong lời gọi hàm, nếu các đối số được truyền vào hàm bị thiếu thì lỗi ngoại lệ phát sinh thuộc loại nào dưới đây?
A. SyntaxError.
B. NameError.
C. TypeError
D. Không phát sinh lỗi ngoại lệ.
Answer explanation
type là dữ liệu cho nên các lỗi như kiểu về biên hay đối số các kiểu thì đưa về lỗi typeError
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
K11_Kiểm tra thường xuyên_Lần 1_HK1

Quiz
•
11th Grade
20 questions
Tin học 7 Excel

Quiz
•
7th - 12th Grade
18 questions
Tin 10 - Bài 3

Quiz
•
10th Grade
20 questions
KTTX lần 01 Tin 11

Quiz
•
11th Grade
20 questions
Kiểm tra TX

Quiz
•
10th Grade
20 questions
2324TX5

Quiz
•
9th - 12th Grade
21 questions
Ôn tập cuối kì Đông. Python

Quiz
•
10th Grade - University
20 questions
BT VỀ HĐH

Quiz
•
10th Grade
Popular Resources on Quizizz
20 questions
math review

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions

Interactive video
•
6th - 8th Grade
19 questions
Math Review

Quiz
•
3rd Grade
45 questions
7th Grade Math EOG Review

Quiz
•
7th Grade
Discover more resources for Computers
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
20 questions
Investing

Quiz
•
9th - 12th Grade
20 questions
EOC Math 1 Review

Quiz
•
9th Grade
20 questions
Insurance

Quiz
•
9th - 12th Grade
20 questions
MCAS Biology Review

Quiz
•
9th - 10th Grade
20 questions
Paying for College

Quiz
•
9th - 12th Grade
20 questions
Math 1 EOC Review

Quiz
•
9th Grade