M2.3: SAQ

M2.3: SAQ

University

19 Qs

quiz-placeholder

Similar activities

ambot para asa ni

ambot para asa ni

University

20 Qs

Logika & Algoritma Pemrograman

Logika & Algoritma Pemrograman

University

20 Qs

C++  quiz

C++ quiz

University

15 Qs

First Meet Sains Data 2022

First Meet Sains Data 2022

University

20 Qs

Mini Try SPMB PKN STAN 2020 by:masuk.stan

Mini Try SPMB PKN STAN 2020 by:masuk.stan

10th Grade - Professional Development

20 Qs

JS P1

JS P1

University

17 Qs

Kvíz o HTML značkách

Kvíz o HTML značkách

9th Grade - University

20 Qs

HTML/CSS

HTML/CSS

9th Grade - Professional Development

20 Qs

M2.3: SAQ

M2.3: SAQ

Assessment

Quiz

Other

University

Easy

Created by

Parker Gaston

Used 1+ times

FREE Resource

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The condition in an if statement may be a(n) _________ .

 Boolean variable

boolean expression

 Compound Boolean expression

 All of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The statements inside an if must be indented using tabs.

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An if statement must always have an accompanying else.

 

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Another name for an if statement is a selection statement.

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Python statement is used to simplify tail nesting code?

else

elif

 

if-else

 

tail

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is displayed by the following code?

a = 5

b = 6

c = 7

d = 8


if a <= 5:

  if b > 7:

    print(c)

  else:

    print(d)

else:

  if b < 7:

    print(2 * c)

  else:

    print(2 * d)

7

8

14

16

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

a = 3

b = 5

c = 7

d = 9


if a >= 5:

  if b > 7:

    print(c)

  else:

    print(d)

else:

  if b < 7:

    print(2 * c)

  else:

    print(2 * d)

7

8

14

16

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?