Search Header Logo

CỦNG CỐ KIẾN THỨC LỆNH VÀO RA TRONG PYTHON

Authored by Thanh Đào

Computers

10th Grade

Used 2+ times

CỦNG CỐ KIẾN THỨC LỆNH VÀO RA TRONG PYTHON
AI

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

20 sec • 1 pt

  1. Lệnh nào sau đây dùng để nhận đầu vào từ người dùng trong Python?

print()

read()

output()

input()

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

  1. Lệnh nào sau đây sẽ in ra dòng chữ “Hello, Python!” trên màn hình?

input("Hello, Python!")

display("Hello, Python!")

print("Hello, Python!")

output("Hello, Python!")

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Lệnh input() trong Python trả về dữ liệu dạng nào?

số nguyên (int)

chuỗi (str)

số thực (float)

boolean (bool)

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Để lưu đầu vào từ người dùng vào một biến có tên là name, lệnh nào sau đây là đúng?

name = input("Nhập tên của bạn: ")

name: input("Nhập tên của bạn: ")

input("Nhập tên của bạn: ") = name

input(name = "Nhập tên của bạn: ")

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Câu lệnh nào sẽ yêu cầu người dùng nhập tuổi và chuyển đổi đầu vào thành kiểu số nguyên?

age = float(input("Nhập tuổi của bạn: "))

age = int(input("Nhập tuổi của bạn: "))

age = str(input("Nhập tuổi của bạn: "))

age = input("Nhập tuổi của bạn: ")

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Kết quả của lệnh str(123.456) là:

"123"

None

123.456

"123.456"

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Để in dòng “Kết quả là: 10” với x = 10, câu lệnh nào sau đây là đúng?

print("Kết quả là:" x)

print("Kết quả là: x")

print("Kết quả là: ", x)

print("Kết quả là: " + x)

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?