
Bài 18: Các câu lệnh vào ra đơn giản

Quiz
•
Information Technology (IT)
•
University
•
Medium
Đặng Vũ Mai Anh
Used 2+ times
FREE Resource
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
Similar Resources on Wayground
11 questions
CodeQuest TechTopia 2025-26

Quiz
•
University
6 questions
Kuis Pointer 1

Quiz
•
University
15 questions
Bài 30

Quiz
•
10th Grade - University
10 questions
Quizzi bài 29 Tin học 10

Quiz
•
10th Grade - University
10 questions
Quiz on Basics of C

Quiz
•
University
10 questions
Tin 9 Bài 8. SUMIF

Quiz
•
9th Grade - University
10 questions
Java Quiz 1 in tamil theme

Quiz
•
University
15 questions
Массив

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University