Search Header Logo
CMPT 101 - Reviewing and Extending Learning on Selection

CMPT 101 - Reviewing and Extending Learning on Selection

Assessment

Presentation

Computers

University

Practice Problem

Easy

Created by

Careene McCallum

Used 3+ times

FREE Resource

15 Slides • 28 Questions

1

media

Let's REVIEW the lab specifications.

2

Word Cloud

Question image

3

media

Take 15 minutes to complete coding for user inputs.

media

4

media

Lab 3
SELECTION

5

media

​Template for Sequential Ifs

6

media

What stands out to you?

7

Multiple Choice

Question image

What will the program output if the user enters 20 as their age?

1
2
3
4

8

Multiple Choice

Question image

What type of control structure is used in this program?

1

Loop

2

Nested if statements

3

Sequential if statements

4

if-else statements

9

Multiple Choice

Question image

If the user is 15 years old, what will be printed?

1
2
3
4

10

Multiple Choice

Question image

What will the program output if the user enters 16 as their age?

1
2
3

11

media

What stands out to you?

12

Multiple Choice

Question image

What will the program output if the user enters 19 as their age?

1
2
3

13

Multiple Choice

Question image

What happens if the user is 17 years old?

1
2
3

14

media

​Template for simple nested ifs

15

media

​​What stands out to you?

16

Multiple Choice

Question image

What will the program output if the user enters 20 as their age?

1
2
3

17

Multiple Choice

Question image

What will the program print if the user enters 17 as their age?

1
2
3

18

Multiple Choice

Question image

Which of the following is true about the program?

1

The program checks if the user is 18 or older before checking if they are 21 or older.

2

The program checks if the user is 21 or older, and then checks if they are 18 or older.

3

The program only checks if the user is 21 or older.

19

Word Cloud

Question image

20

media

​Template for if-elif-else

21

​What stands out to you?

media

22

Multiple Choice

Question image

What inputs would generate this output?
You have access to extended privileges and additional perks. You have successfully joined the email list.
Thank you for being a valued participant!

1

level = "a"
subscribe = "y"

2

level = "a"
subscribe = "yes"

3

level = "s"

23

Multiple Choice

Question image

What inputs would generate this output?
You have full access to all exclusive options and priority services. Thank you for being a valued participant!

1

level = "s"
subscribe = "yes"

2

level = "a"
subscribe = "no"

3

level = "e"

24

Multiple Select

Question image

What inputs would generate this output?
You have access to extended privileges and additional perks. You chose not to join the email list. Thank you for being a valued participant!
(Select all that apply)

1

level = "a"
subscribe = "n"

2

level = "a"
subscribe = "no"

3

level = "a"
subscribe = "y"

25

Multiple Select

Question image

What inputs would generate this output?
You have limited privileges to standard options. Thank you for being a valued participant!
(Select all that apply)

1

level = "S"

2

level = "s"

3

level = "K"

26

media

​What's different?

27

media

​What's different? No .lower()

28

Multiple Select

Question image

What inputs will give the following output.
You have limited privileges to standard options. Thank you for being a valued participant!

(Select all that apply)

1

level = "S"

2

level = "s"

3

level = "a"

4

level = "A"

29

Multiple Select

Question image

What inputs will give the following output.
You have access to extended privileges and additional perks. You chose not to join the email list. Thank you for being a valued participant!
(Select all that apply)

1

level = "a"
subscribe = "Yes"

2

level = "a"
subscribe = "y"

3

level = "a"
subscribe = "no"

4

level = "a"
subscribe = "yes"

30

Multiple Choice

If the input is 'YES' and the code uses .lower(), what will the value of the input become?

1

Yes

2

yes

3

YES

4

31

Multiple Choice

If the input is 'hello world' and the code uses .title(), what will the value of the input become?

1

Hello world

2

Hello World

3

HELLO WORLD

4

32

Multiple Select

Which methods allow the program to handle input in a way that makes it not case-sensitive?

(Select all that apply)

1

.lower()

2

.title()

3

.upper()

33

Word Cloud

Question image

34

​Take 30 minutes to do sequential ifs, as needed, in the lab.

media

What do you want to happen each time you get a YES or NO?

35

media

​What stands out for you?

36

Fill in the Blanks

media image

Type answer...

37

Multiple Choice

Question image

What is the output?

1

True

2

False

38

Multiple Choice

Question image

What is the output?

1

True

2

False

39

Multiple Choice

Question image

What is the output?

1

True

2

False

40

Multiple Choice

Question image

What is the output?

1

True - Student passes with good standing.

2

True - Student qualifies for the honor roll.

3

False - Student does not meet the criteria.

41

Multiple Choice

Question image
1

BIY

2

Biy

3

biy

4

en

42

Open Ended

Question image

43

media
media

Let's REVIEW the lab specifications.

Show answer

Auto Play

Slide 1 / 43

SLIDE