Quizz_Python_Basic_If_Elif_Else

Quizz_Python_Basic_If_Elif_Else

9th Grade

10 Qs

quiz-placeholder

Similar activities

Sexual and Asexual Reproduction

Sexual and Asexual Reproduction

9th Grade

10 Qs

Mammal surveys

Mammal surveys

12th Grade

15 Qs

exchange of materials in human

exchange of materials in human

10th Grade

10 Qs

Quiz 4 Science 9

Quiz 4 Science 9

9th Grade

10 Qs

Kiểm tra 15p tin 12 lần 2 (hk1)

Kiểm tra 15p tin 12 lần 2 (hk1)

12th Grade

10 Qs

Disaster Readiness and Risk Reduction Module 1 Quiz

Disaster Readiness and Risk Reduction Module 1 Quiz

11th Grade

15 Qs

Integrating subjects

Integrating subjects

1st Grade - Professional Development

10 Qs

Electricty and Magnetism

Electricty and Magnetism

7th - 9th Grade

15 Qs

Quizz_Python_Basic_If_Elif_Else

Quizz_Python_Basic_If_Elif_Else

Assessment

Quiz

Science

9th Grade

Practice Problem

Easy

Created by

Thành Duy

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...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu lệnh if - else trong Python được sử dụng để làm gì?

Kiểm tra và xử lý ngoại lệ

Thực hiện vòng lặp

Kiểm tra điều kiện và thực thi hành động tùy thuộc vào điều kiện đó

In ra màn hình câu lệnh đã nhập

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu lệnh else trong Python sẽ được thực thi khi nào?

Khi tất cả các biểu thức điều kiện đều sai

Khi tất cả các biểu thức điều kiện đều đúng

Khi biểu thức điều kiện if sai

Khi biểu thức điều kiện elif đúng

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cấu trúc của một câu lệnh if trong Python là gì?

if (condition) {}

if condition:

if (condition): else:

if condition: else condition:

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu lệnh elif có thể có bao nhiêu lần trong một câu lệnh if - elif - else?

1 lần

Không giới hạn

2 lần

3 lần

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu lệnh nào dưới đây là cú pháp đúng trong Python?

if x > 5 print("Hello")

if x > 5: print("Hello")

if x > 5 then print("Hello")

if x > 5 {print("Hello")}

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Kết quả của đoạn mã sau sẽ là gì?

x = 10

if x > 5: print("Greater")
else: print("Smaller")

Smaller

Greater

Lỗi cú pháp

Không có kết quả

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Nếu bạn có một câu lệnh if và một câu lệnh elif, và cả hai điều kiện đều sai, câu lệnh nào sẽ được thực thi?

Câu lệnh if

Câu lệnh elif

Câu lệnh else

Không có câu lệnh nào

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?