Search Header Logo
BJC U5L1d2 Traversing a List

BJC U5L1d2 Traversing a List

Assessment

Presentation

Computers

10th Grade - University

Medium

Created by

TSEE LEE

Used 8+ times

FREE Resource

3 Slides • 16 Questions

1

Open Ended

Question image

See pic.

2

Multiple Choice

Should you end English sentences in a preposition like "with" or "to"?

EX: Which table is "dept_name" a field in?

1

Yes

2

No

3

Avoid in formal writing because it's technically grammatically wrong

4

Avoid in formal writing to avoid offending people who don't know grammar

3

media

​You'll answer on the next slide

4

Fill in the Blank

Question image

What would the previous procedure return?

5

media

Which works, which doesn't? You'll answer on the next slide.

6

Multiple Choice

Question image

Which of those procedures work as expected for any lists?

1

A

2

B

3

Both

4

Neither

7

Multiple Choice

Question image

When will "Error. Invalid entry." be displayed?

1

When a>b is true

2

When a>b is false

3

Always

4

Never

8

Multiple Choice

Question image

Write it out! What is the displayed on the stage?

(May skip w/ 30s left)

1

[-1, 0, 1, 4]

2

[-1, 2, 4, 5]

3

[-1, 1, 3, 4]

4

None of the above

9

media
media

numList: [-1, 0, 1, 2, 3, 4, 5]

delete item 2: ​[-1, 1, 2, 3, 4, 5]

del item 3: ​[-1, 1, 3, 4, 5]

del item 5: ​[-1, 1, 3, 4]​

Trace the code

Think, don't say:

How do we fix this​?

Moral of the story?

10

Multiple Choice

A simulation is ...

1

a model

2

a hypothesis

3

when you exercise a model using values for input parameters

4

an algorithm with a hypothesis

11

Multiple Choice

A hypothesis is ...

1

a type of an algorithm

2

the solution to a model

3

tentative explanation to be tested by further investigation

4

the results of a simulation

12

Multiple Choice

A computer model is ...

1

a premier computer entered by a manufacturer in a competition

2

can simulate what might happen in a situation

3

requires a hypothesis

4

a simulation

13

Multiple Choice

A binary search ...

1

is faster than a linear search

2

works less efficiently with an unsorted list

3

accesses all the items in a list

4

requires a sorted list

14

Multiple Choice

Question image

Assume code works as intended. What will be the value of list3 after this script is executed?

1

1 1 2 2 3 3 4 4

2

1 2 3 4

3

4 4 3 3 2 2 1 1

4

4 3 2 1

15

Multiple Choice

Question image

The "flip a coin" procedure demonstrates ...

1

hypothesis

2

linear search

3

binary search

4

abstraction

16

Multiple Choice

Question image

The instruction "change (head_count) by (flip a coin()) can be replaced by which of the following and still produce the same result?

1

set (head_count) to (head_count + flip a coin)

2

set (head_count) to (flip a coin())

3

set (head_count) to (head_count + 1)

4

set (head_count) to (1)

17

Multiple Choice

What is x?

numbers[x] <-- 3

(left arrow)

1

an element of the list

2

may be any primitive data type supported by the programming language

3

must be a whole number

4

is set to 3

18

Multiple Choice

A binary search is the fastest when ...

1

You only need to search the list a single time

2

The list in question is very short

3

You perform lots of searches for different values, with no duplicates in the list

4

You perform lots of searches for different values, some of which repeat in the list

19

Multiple Choice

A non-traditional data source used when monitoring a disease spread is ...

1

the # of people infected by disease as reported by doctors

2

the # of prescriptions for disease reported by pharmacists

3

the # of zombies reported in the area

4

the # of people googling the disease in a given area

Question image

See pic.

Show answer

Auto Play

Slide 1 / 19

OPEN ENDED