Search Header Logo
Untitled Lesson

Untitled Lesson

Assessment

Presentation

Computers

9th Grade

Hard

Created by

TUAN Moe

FREE Resource

164 Slides • 58 Questions

1

media

2

Multiple Choice

Question image

Apakah yang berlaku untuk program ini?

1

Moves forward 1 time

2

Moves forward forever

3

Moves forward 5 times

4

Moves left

3

Multiple Choice

Question image

Which of these blocks can be identified as Iteration.

1

When Space key pressed

2

Forever

3

Move 10 Steps

4

If on edge, bounce

4

Multiple Choice

Question image

Consider the following flow chart showing a process for program execution. Given that a = 5, and b = 10, what will be displayed by the program?

1

a is bigger

2

b

3

5

4

10

5

Nothing will be displayed

5

Multiple Choice

Question image
Repeating a statement more than once or until a condition is met is called a..?
1
Loop
2
Sequence
3
Repetition
4
Event

6

Multiple Choice

Question image

I can do what with this..

1

Click it because it's pink.

2

Repeat my steps with LESS puzzle pieces.

3

Looks kind if weird.

7

Multiple Choice

Question image
What would this script have a sprite do?
1
When space key is pressed, forever do the following: turn 30 degrees right, wait one second, turn 30 degrees left, wait one second
2
When space key is pressed, forever turn 30 degrees right, wait 2 seconds, turn 30 degrees left, wait two seconds
3
When the space key is pressed, repeat the following 5 times: turn 30 degrees right, wait 1 second, turn 30 degrees left, wait 1 second
4
When the space key is pressed, turn 30 degrees to the right, wait 1 second, turn 30 degrees to the left, and wait 1 second

8

Multiple Choice

Question image

When this program is run, the last pumpkin is not harvested. Why? (17-6)

1

You should have added another Pick Path function.

2

You should have used an If Conditional instead of a Why Conditional for Pumpkins.

3

You should have moved the pick block after the forward block

4

Pumpkins should be picked before corn in the Pick function.

9

Multiple Choice

Question image

What will be the result of the code shown?

1

7

6

5

4

3

2

1

2

7

6

5

4

3

2

3

7

6

5

4

3

4

Nothing, there's an error

10

Multiple Choice

Question image

If the value of inputtedNum is 6, then what is the output of the following code?

1

<no output>

2

The sun will shine bright

3

The moon will glow bright

4

Error

11

Multiple Choice

Question image

Tom has installed a new smart heating system in his home.

Shown is the section of code that controls when the heating switches on.

Which code shows the correct completion of line 9?

1

TEMP >= 14.5

2

TEMP < 14.5

3

TEMP > 14.5

4

TEMP >= 14.6

12

Multiple Choice

Question image

What's the difference between these 2 scripts?

1

the first one will say Hello once and second will say it for 2 seconds

2

the second one will say Hello forever and first one will say it for 2 seconds

3

the second one will say Hello once and first one will say it for 2 seconds

4

the first one will say Hello forever and second one will say it for 2 seconds

13

Multiple Choice

Question image

What does the following algorithm do?

1

Add up all the numbers between (and including) 1 and 5

2

Add up all the numbers between (and including) 1 and 6

3

Add up the numbers 1 and 5

4

Add up the numbers 1 and 6

14

Multiple Choice

Question image

The following question uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the bottom left square of the grid and facing right.


Which of the following shows the location of the robot after running the code segment?

1
2
3
4

15

Multiple Choice

Question image

What control structure would be best to use in the following code?

1

A function

2

A while loop

3

A for loop

4

An if/else statement

16

Multiple Choice

Question image

A program races four avatars against each other: Piceratops, Leafers, Duskpin, and Aqualine.

Here they are lined up at the start line, in that order:

After the first 3 repetitions of each loop, which avatar will be ahead?

1
2
3
4
5

Two avatars will be tied for the lead.

17

Multiple Choice

Question image

Which concept is not present in the following code?

1

Iteration

2

Selection

3

Variable assignment

18

Multiple Choice

Question image
When the flow of this code gets to the boolean, what question will be asked?
1
Is it true that the c key was pressed or is it false?
2
What is the size of the Sprite?
3
Is it true that the angry function was called or is it false?
4
Is the Sprite angry?

19

Multiple Choice

Question image

Which of these algorithms will move the robot along the same path as the algorithm below?

1

MOVE_FORWARD()

TURN_RIGHT()

MOVE_FORWARD()

TURN_RIGHT()

MOVE_FORWARD()

TURN_RIGHT()

MOVE_FORWARD()

TURN_RIGHT()

2

REPEAT 2 TIMES

{

    MOVE_FORWARD()

    MOVE_FORWARD()

    TURN_RIGHT()

    MOVE_FORWARD()

    TURN_RIGHT()

}

20

Multiple Choice

Question image
What part of this code is a loop?
1
The purple 'define Angry' block
2
the gold 'wait ___ secs' block
3
the gold 'repeat until' block
4
the blue 'key c pressed?' block

21

Fill in the Blank

Question image

The following code snippet processes a list of strings with a loop and conditional:

The code relies on one string operation, UPPER(string), which returns string in uppercase.

What value will this program display?

22

Multiple Choice

Question image

What will happen when the flag is pressed?

1

sprite will say Hello! then Goodbye!

2

Sprite will say Hello! only

3

Sprite will say Goodbye! only

4

Sprite will say nothing

23

Multiple Choice

Question image

Hannah and Daniel are helping a robot learn to move! Take a look at this code block. What will the robot do when Hannah clicks "Run"?

1

Moves forward 1 time

2

Moves forward forever

3

Moves forward 5 times

4

Moves left

24

Multiple Choice

Question image

The action of doing something over and over again.

1

Looping

2

Bugging

3

Programming

25

Multiple Choice

Question image

These blocks are different examples of what?

1

motion

2

events

3

controls

4

sound

26

Multiple Choice

Question image

In total, how many times is the inner loop executed?

1

5

2

10

3

15

4

50

5

Infinite Loop

27

Multiple Choice

Question image

This is an example of a(n)...

1

sequential operation

2

conditional operation

3

iterative operation

4

unconditional operation

28

Multiple Choice

Question image

What condition should be used in this while loop to get Karel to pick up all the tennis balls on the current location?

1
  1. noBallsPresent()

2
  1. ballsPresent()

3
  1. frontIsClear()

4
  1. takeBall()

29

Multiple Choice

Question image
1

x

2

y

3

10

4

12

30

Multiple Choice

Question image

Say Karel is on a location with one tennis ball. After the following code runs, how many tennis balls will there be at that location?

1

0

2

1

3

2

4

6

31

Multiple Choice

Question image

What loop is this?

1

Forever loop

2

Fixed loop

32

Multiple Choice

Question image

Which block would you use to replace the "?" in the code?

(click the picture to make it bigger)

1
2
3
4

33

Multiple Choice

Question image

Which block represents Iteration in Scratch programming?

1

wait 1 second

2

set score to 0

3

forever

4

create clone of myself

34

Multiple Choice

Question image

Tindakan melakukan sesuatu berulang kali.

1

Pengulangan

2

Bugging

3

Pemrograman

35

Multiple Choice

Question image

Hey Aanya, Siya, and Divya! Let's dive into the world of Scratch programming! Can you spot which of these blocks represents Iteration?

1

wait 1 second

2

set score to 0

3

forever

4

create clone of myself

36

Multiple Choice

Question image

Who is most likely to use the code on the left?

1

Customer

2

Manager

3

Technician

4

Programmer

37

Multiple Choice

Question image

Apa yang dilakukan kode ini?

1

Bergerak maju 1 kali

2

Bergerak maju selamanya

3

Bergerak maju 5 kali

4

Bergerak ke kiri

38

Multiple Choice

Question image

What does this block do?

1

Repeat the code forever

2

Repeat the code 2 times

3

Repeat the code until touching the sprite

39

Multiple Choice

Question image

What does the mystery function do?

1

Karel moves until it is on a ball

2

Karel moves once if there is no ball present

3

Karel moves until it puts down a ball

4

Karel checks if there is no ball on the current spot and then moves once

40

Fill in the Blank

Question image

Berapa banyak output "cat" akan dipaparkan ?

41

Multiple Choice

Question image

A 9-hole golf course is introducing an app to replace paper scorecards. The total score is the number of times the player hits the ball to complete all 9 holes.

Each hole has a target score known as the par value.

If a score entered is three or more above the par value for that hole it is

adjusted to the par value plus two. This is shown for holes 3 and 6.

Part of the code for the app is shown below.

Line 10 REPEAT 9 TIMES

Line 11 RECEIVE par FROM (INTEGER) KEYBOARD

Line 12 RECEIVE score FROM (INTEGER) KEYBOARD

Line 13 < calculate final score for each hole >

Line 14 < update totalScore >

Line 15 END REPEAT

Line 16 SEND totalScore TO DISPLAY

Choose the correct code for line 13.

1

if score > par+2:

score = par+2

2

if score > par:

score = par+2

3

if score == par+2:

score = par+2

4

if score < par+2:

score = par+2

42

Multiple Choice

Question image

Which of these blocks can be identified as Iteration?

1

wait 1 second

2

set score to 0

3

forever

4

create clone of myself

43

Multiple Choice

Question image

What is the purpose of this script?

1

Make the mouse bounce like a ball.

2

Make the mouse run across the screen indefinitely.

3

Make the mouse run away from the cat.

4

Make the mouse run away and disappear off the screen.

44

Multiple Choice

What is a Count-Controlled loop?

1

for loop

2

while loop

45

Multiple Choice

Which block allows you to make decisions (choices)?

1
2
3
4

46

Multiple Choice

To make character pause or slow in scratch, control that is added to script is

1

Forever

2

Repeat

3

Wait

4

Next costume

47

Multiple Choice

These controls the behavior of a program.
1
class
2
object
3
method
4
void

48

Multiple Choice

The ‘else’ statement is optional in Python

1

TRUE

2

FALSE

49

Multiple Choice

When does the code block following while(x<100) execute?

1

When x is less than one hundred

2

When x is greater than one hundred

3

When x is equal to one hundred

4

while it wishes

50

Multiple Choice

Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?

1

for

2

while

3

do..while

4

None of the above

51

Multiple Choice

What syntax follows after an if statement?
1
parenthesis
2
curly braces
3
a colon
4
square brackets

52

Multiple Choice

What will be the output of the following program.

class WeekDays

{

public static void main(String s[])

{

int day = 4;

switch(day)

{

case 1:

System.out.println("Monday");

case 2:

System.out.println("Tuesday");

case 3:

System.out.println("Wednesday");

case 4:

System.out.println("Thursday");

case 5:

System.out.println("Friday");

default:

System.out.println("Weekend");

break;

}

}

}

1

Thursday

2

Compilation Error

3

Thursday

Friday

Weekend

4

Runtime error

53

Multiple Choice

A while loop is used when

1

You know how many times you are going to loop

2

You want to loop for an unknown number of times, and possibly forever

3

You only want to run the code in the loop once

4

You see the word while in the problem description

54

Multiple Choice

Which of the following is known as Exit Controlled Loop?

1

for loop

2

do while loop

3

while loop

4

All of these

55

Multiple Choice

Which of the following blocks would repeat a code until a certain condition was met?

1
2
3
4

56

Multiple Choice

The __________ statement uses single expression for multiple choices

1

loop

2

switch

3

multiple value

4

if else

57

Multiple Choice

In a Python program , a control structure:

1

directs the order of execution of the statements in the program

2

dictates what happens before te program starts and after it terminates

3

defines program-specific data structures

4

manages the input and output of control characters

58

Multiple Choice

7. Like Karel but already knows how to turnRight() and turnAround()
1
Curly Bracket
2
World
3
Super Karel
4
Define A Function

59

Multiple Choice

What is the benefit of using the break command as in the program below?

magic_number = 10

while True:

guess = int(input("Guess my number: "))

if guess == magic_number:

print "You got it!"

break

print "Try again!"

1

The user can enter as many answers as they want

2

The program will break out of the loop as soon as the user enters the magic_number

3

The loop will prompt the user to enter a number no matter what input they give

4

The loop will give the magic_number after a certain number of tries

60

media

61

media

62

media

63

media

64

media

65

media

66

media

67

media

68

media

69

media

70

media

71

media

72

media

73

media

74

media

75

media

76

media

77

media

78

media

79

media

80

media

81

media

82

media

83

media

84

media

85

media

86

media

87

media

88

media

89

media

90

media

91

media

92

media

93

media

94

media

95

media

96

media

97

media

98

media

99

media

100

media

101

media

102

media

103

media

104

media

105

media

106

media

107

media

108

media

109

media

110

media

111

media

112

media

113

media

114

media

115

media

116

media

117

media

118

media

119

media

120

media

121

media

122

media

123

media

124

media

125

media

126

media

127

media

128

media

129

media

130

media

131

media

132

media

133

media

134

media

135

media

136

media

137

media

138

media

139

media

140

media

141

media

142

media

143

media

144

media

145

media

146

media

147

media

148

media

149

media

150

media

151

media

152

media

153

media

154

media

155

media

156

media

157

media

158

media

159

media

160

media

161

media

162

media

163

media

164

media

165

media

166

media

167

media

168

media

169

media

170

media

171

media

172

media

173

media

174

media

175

media

176

media

177

media

178

media

179

media

180

media

181

media

182

media

183

media

184

media

185

media

186

media

187

media

188

media

189

media

190

media

191

media

192

media

193

media

194

media

195

media

196

media

197

media

198

media

199

media

200

media

201

media

202

media

203

media

204

media

205

media

206

media

207

media

208

media

209

media

210

media

211

media

212

media

213

media

214

media

215

media

216

media

217

media

218

media

219

media

220

media

221

media

222

media
media

Show answer

Auto Play

Slide 1 / 222

SLIDE