条件语句

条件语句

University

30 Qs

quiz-placeholder

Similar activities

Script_programming_test

Script_programming_test

University

25 Qs

PROLOG-Final Examination

PROLOG-Final Examination

University

30 Qs

python 3-5 unit 10gr

python 3-5 unit 10gr

10th Grade - University

25 Qs

UTS PYTHON

UTS PYTHON

12th Grade - University

25 Qs

Basics of OOP with JAVA

Basics of OOP with JAVA

University

25 Qs

R Quiz

R Quiz

University

26 Qs

python39-02

python39-02

University

30 Qs

Plotting in Python

Plotting in Python

12th Grade - University

25 Qs

条件语句

条件语句

Assessment

Quiz

Computers

University

Medium

Created by

Alex Ma

Used 1+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

如果 a = 10, b = 5, 那么以下哪个表达式的结果为 True?
a > b
a < b
a == b
a <= b

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

如果 x = 5, y = 10, 以下代码的输出是什么? if x > y: print("x大于y") else: print("x小于等于y")
x大于y
x小于等于y
程序错误
无输出

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

如果 a = 3, b = 7, 以下代码的输出是什么? if a > b: print("a大于b") elif a < b: print("a小于b") else: print("a等于b")
a大于b
a小于b
a等于b
程序错误

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

如果 x = 10, 以下代码的输出是什么? if x > 5: if x < 15: print("x在5和15之间") else: print("x大于等于15") else: print("x小于等于5")
x在5和15之间
x大于等于15
x小于等于5
程序错误

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

如果 a = 1, b = 2, c = 3, 以下哪个表达式的结果为 True?
a > b and b > c
a < b and b < c
a > b or b > c
a == b

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

如果 x = -5, 以下代码的输出是什么? if x > 0: print("正数") else: print("非正数")
正数
非正数
程序错误
无输出

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

如果 a = 10, b = 10, 以下代码的输出是什么? if a > b: print("a大于b") elif a < b: print("a小于b") else: print("a等于b")
a大于b
a小于b
a等于b
程序错误

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?