Câu hỏi trắc nghiệm Python

Câu hỏi trắc nghiệm Python

10th Grade

8 Qs

quiz-placeholder

Similar activities

Visual Basic 2010

Visual Basic 2010

8th Grade - University

10 Qs

Hệ Điều Hành

Hệ Điều Hành

10th Grade

12 Qs

Types of Mass Media

Types of Mass Media

10th Grade - Professional Development

11 Qs

Common Protocols

Common Protocols

10th - 12th Grade

15 Qs

Bài 5: Thiết lập trang giấy và xuất bài nhạc

Bài 5: Thiết lập trang giấy và xuất bài nhạc

7th - 11th Grade

11 Qs

Basic computer

Basic computer

9th - 12th Grade

8 Qs

OCR Internet Technologies

OCR Internet Technologies

10th - 11th Grade

12 Qs

Word 2016 Lesson 1

Word 2016 Lesson 1

9th - 12th Grade

10 Qs

Câu hỏi trắc nghiệm Python

Câu hỏi trắc nghiệm Python

Assessment

Quiz

Computers

10th Grade

Practice Problem

Hard

Created by

Quyên Trần

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong ngôn ngữ Python, lệnh nào dùng để hiển thị dữ liệu ra màn hình?

output()

display()

print()

write()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Kết quả của đoạn lệnh sau là gì? print("Hello", "world!")

Hello world!

Hello

world!

Hello, world!

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cho đoạn mã sau: name = input("Your name: ") print("Hello", name) Lệnh input(...) thực hiện chức năng gì?

Hiển thị chuỗi "Hello" ra màn hình.

Gán giá trị mặc định cho biến name.

Nhập dữ liệu từ người dùng và gán vào biến name.

In tên người dùng ra màn hình.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong Python, khi nào cần dùng hàm int() kết hợp với input()?

Khi muốn in kết quả ra màn hình.

Khi cần nhập chuỗi ký tự.

Khi cần nhập và xử lý dữ liệu dạng số nguyên.

Khi muốn hiển thị số nguyên.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Đâu là lý do chính khiến đoạn mã sau bị lỗi? x = input("Nhập số: ") print(x + 10)

input không hoạt động trong Python.

Không thể cộng chuỗi với số nguyên.

Thiếu dấu ngoặc kép.

print không in được số.

6.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Đoạn mã nào dưới đây giúp nhập 2 số thực và tính trung bình cộng của chúng?

a = input("a = ") b = input("b = ") print((a + b)/2)

a = float(input("a = ")) b = float(input("b = ")) print((a + b)/2)

a = int(input("a = ")) b = int(input("b = ")) print(a + b / 2)

a = input() b = input() print(a + b)

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Cho đoạn mã: name = input("Tên của bạn là gì? ") print("Chào", name) Nếu người dùng nhập 'Lan', kết quả là gì?

Tên của bạn là gì? Lan

Chào Lan

Hello Lan

Lan

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?