
Bài 18: Các câu lệnh vào ra đơn giản
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Medium
Đặng Vũ Mai Anh
Used 4+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Lệnh nào sau đây sẽ báo lỗi?
int("12+45")
float(123.56)
float("123,5.5")
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Tại sao khi nhập một số thực cần viết lệnh float(input())?
Vì hàm input() luôn trả về kiểu chuỗi, cần chuyển đổi sang kiểu số thực.
Vì hàm input() luôn trả về kiểu số nguyên.
Vì hàm input() không thể nhận được giá trị thập phân.
Vì hàm input() luôn trả về giá trị logic.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh nào sau đây sẽ không báo lỗi?
int("12 34")
float("123.45")
float("123,45.6")
int("abc123")
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của lệnh int("12.5") sẽ là gì?
Số nguyên 12
Số nguyên 13
Số thực 12.5
Lỗi ValueError
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Tại sao float("123.45abc") sẽ báo lỗi?
Vì không thể chuyển đổi chuỗi thành số.
Vì chuỗi chứa quá nhiều số.
Vì chuỗi chứa ký tự không hợp lệ.
Vì dấu chấm không được chấp nhận.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh int(" 456 ") sẽ trả về kết quả gì?
Lỗi vì chuỗi chứa khoảng trắng.
Số nguyên 456.
Số thực 456.0.
Lỗi vì chuỗi chứa số nguyên.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kiểu dữ liệu nguyên (integer) trong Python là gì? Kiểu dữ liệu này có thể thực hiện các phép toán nào?
Là kiểu dữ liệu dùng để lưu trữ các chuỗi ký tự, thực hiện phép cộng và nhân.
Là kiểu dữ liệu dùng để lưu trữ các số nguyên, thực hiện các phép cộng, trừ, nhân, chia, và các phép toán khác.
Là kiểu dữ liệu dùng để lưu trữ các số thập phân, thực hiện phép chia và nhân.
Là kiểu dữ liệu dùng để lưu trữ các ký tự đặc biệt, thực hiện phép cộng và chia.
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
12 questions
Programming Quiz
Quiz
•
University
10 questions
HTML + CSS + JS
Quiz
•
University
10 questions
BÀI F10. ĐỊNH KIỂU CSS CHO SIÊU LIÊN KẾT VÀ DANH SÁCH
Quiz
•
University
11 questions
Структурированный тип данных массив
Quiz
•
10th Grade - University
15 questions
Lista de Exercícios – Vetores em Java - Parte I
Quiz
•
University
10 questions
Comandos SQL
Quiz
•
University
15 questions
Minigame CLB Tin học 20/10
Quiz
•
University
15 questions
Quiz KTCB & fun
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
