Comp Sci unit 3 #8

Comp Sci unit 3 #8

11th Grade

10 Qs

quiz-placeholder

Similar activities

Peer-to-peer & Client-server

Peer-to-peer & Client-server

11th Grade

10 Qs

Uji Pengetahuan TIK untuk Siswa Kelas 7

Uji Pengetahuan TIK untuk Siswa Kelas 7

7th Grade - University

15 Qs

Grade 11 Term 4 Practice 2

Grade 11 Term 4 Practice 2

11th Grade

10 Qs

Computing figures

Computing figures

4th - 12th Grade

14 Qs

Podsumowanie: binarny, komputer, sieć

Podsumowanie: binarny, komputer, sieć

7th Grade - University

13 Qs

BTEC Level 3 Nat Ext Dip in Computing - Unit 2.1 Hardware and Software

BTEC Level 3 Nat Ext Dip in Computing - Unit 2.1 Hardware and Software

11th - 12th Grade

10 Qs

EmTech Q2 Post Test 2

EmTech Q2 Post Test 2

11th Grade

15 Qs

Keyboarding Terms

Keyboarding Terms

9th - 12th Grade

10 Qs

Comp Sci unit 3 #8

Comp Sci unit 3 #8

Assessment

Quiz

Computers

11th Grade

Practice Problem

Easy

Created by

Nick Nessralla

Used 11+ 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

An algorithm is intended to display the following output.

red red blue red red blue red red blue

Which of the following code segments can be used to display the intended output?

Media Image
Media Image
Media Image
Media Image

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

A flowchart provides a way to visually represent an algorithm and uses the following building blocks.

BlockExplanationOvalThe start or end of the algorithmRectangleOne or more processing steps, such as a statement that assigns a value to a variableDiamondA conditional or decision step, where execution proceeds to the side labeled true if the condition is true and to the side labeled false otherwiseParallelogramDisplays a message

 

In the flowchart below, assume that j and k are assigned integer values.

 

Which of the following initial values of j and k will cause the algorithm represented in the flowchart to result in an infinite loop?

j = -5, k = 5

j = 0, k = 5

j = 5, k = 0

j = 5, k = -5

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following program.

Which of the following describes the result of executing the program?

The program displays the sum of the even integers from 2 to 10.

The program displays the sum of the even integers from 2 to 20.

The program displays the sum of the odd integers from 1 to 9.

The program displays the sum of the odd integers from 1 to 19.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The code segment below is intended to display all multiples of 5 between the values start and end, inclusive. For example, if start has the value 35 and end has the value 50 , the code segment should display the values 35,40 45, , and 50. Assume that start and end are multiples of 5 and that start is less thanend .

Which of the following could replace <Missing Expression> in line 2 so that the code segment works as intended?


Media Image
Media Image
Media Image
Media Image

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

The following code segment is intended to remove all duplicate elements in the list myList. The procedure does not work as intended.

j ← LENGTH(myList)

REPEAT UNTIL(j = 1)

{

IF(myList[j] = myList[j - 1])

{

REMOVE(myList, j)

}

j ← j - 1

}

For which of the following contents of myList will the procedure NOT produce the intended results?

Select two answers.


[10, 10, 20, 20, 10, 10]

[30, 30, 30, 10, 20, 20]

[30, 50, 40, 10, 20, 40]

[50, 50, 50, 50, 50, 50]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

A biologist wrote a program to simulate the population of a sample of bacteria. The program uses the following procedures.

Code for the simulation is shown below.

hours ← 0

startPop ← InitialPopulation ()

currentPop ← startPop

REPEAT UNTIL ((hours ≥ 24) OR (currentPop ≤ 0))

{

currentPop ← NextPopulation (currentPop)

hours ← hours + 1

}

DISPLAY (currentPop - startPop)

Which of the following are true statements about the simulation?

  1. -The simulation continues until either 24 hours pass or the population reaches 0.

  2. -The simulation displays the average change in population per hour over the course of the simulation.

  3. -The simulation displays the total population at the end of the simulation.

I only

II only

III only

I and II

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following program code.

 

Which of the following best describes the result of running the program code?

The number 0 is displayed.

The number 6 is displayed.

The number 10 is displayed.

Nothing is displayed; the program results in an infinite loop.

Access all questions and much more by creating a free account

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

Already have an account?