0% found this document useful (0 votes)
27 views14 pages

Grade 8 Programming & Computational Thinking 1 - Unit Test

The document outlines a quiz for a Programming & Computational Thinking course, consisting of 30 questions related to pseudocode, programming constructs, data types, and error handling. Students are instructed to complete the quiz within 30 minutes under monitored conditions to prevent academic misconduct. The questions cover various programming concepts, including loops, arrays, and algorithm comparisons.

Uploaded by

hongchau231296
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views14 pages

Grade 8 Programming & Computational Thinking 1 - Unit Test

The document outlines a quiz for a Programming & Computational Thinking course, consisting of 30 questions related to pseudocode, programming constructs, data types, and error handling. Students are instructed to complete the quiz within 30 minutes under monitored conditions to prevent academic misconduct. The questions cover various programming concepts, including loops, arrays, and algorithm comparisons.

Uploaded by

hongchau231296
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Programming
LMS Support & Computational Thinking 1 - Unit Test

Started: 18 Nov at 8:58

Quiz instructions
INSTRUCTIONS
- Do NOT begin the test until you are told.
- Close any other programmes or web-pages you have open.
- The LMS monitors your computer when the test is running. Opening other programmes or web-pages may be treated as academic
misconduct (gian lận học đường).
- You have 30 minutes to complete the test, after which it will be automatically submitted.

Question 1 1 pts

What is the error in the pseudocode below:

START
FOR i = 1 TO 5
OUTPUT i
STOP

OUTPUT should be INPUT

TO should be FROM

These is a missing IF statement

There is a missing END FOR

Question 2 1 pts

How many times will the FOR loop below repeat?

ARRAY colours = ["black", "pink", "black", "pink"]


FOR c in colours
OUTPUT "I like" c
END FOR

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 1/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 3 1 pts

What will this loop output in pseudocode:

FOR i = 0 TO 3
OUTPUT i
END FOR

1
2
3

0
1
2
3

1
2
3
4

0
1
2
4

Question 4 1 pts

What is the name of the variable in the pseudocode below:

FOR b = 0 to 10
OUTPUT 10 - b
END FOR
OUTPUT "blast off!"

FOR

"blast off!"

10 - b

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 2/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 5 1 pts

What is the purpose of a count-controlled loop in an algorithm?

To store data

To make decisions

To repeat steps a fixed number of times

To take user input

Question 6 1 pts

What decides how many times a count-controlled loop repeats?

A predetermined count

User input

Random values

A condition that may change

Question 7 1 pts

What will be displayed on the screen by this pseudocode algorithm:

FOR m = 10 TO 13
OUTPUT m * 3
END FOR

Error

30
33
36
39

10
11
12
13

0
3
6
9

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 3/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 8 1 pts

Choose the correct outputs for this pseudocode:

FOR c in "computer"
OUTPUT c
END FOR

computer

c
c
c
c
c
c
c
c

r
e
t
u
p
m
o
c

c
o
m
p
u
t
e
r

Question 9 1 pts

When comparing algorithms, which of these factors is NOT important?

Which algorithm runs faster.

Which algorithm is more efficient.

Which algorithm uses more variables.

Which algorithm is clearer and easier to follow.

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 4/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 10 1 pts

What type of programming construct/structure/technique is a FOR loop?

sub-routine

sequence

selection

count-controlled iteration

Question 11 1 pts

What is the purpose of an array in programming?

To sort data automatically

To store a single value

To store many values of the same type

To help manage a loop

Question 12 1 pts

Which data type is defined as exactly one letter/number/symbol?

Boolean

Real

Character

Integer

String

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 5/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 13 1 pts

What data type is "Friends4Ever"?

Real

Integer

Character

String

Boolean

Question 14 1 pts

How many times will this loop, written in Python, run?

for n in range(3):
print("Number", n)

1 time

3 times

4 times

2 times

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 6/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 15 1 pts

What will this loop, written in Python, display/output when run?

for c in "skibidi":
if c == "i":
print(c)

s
k
i

False

i
i
i

No answer text provided.

s
k
i
b
i
d
i

Question 16 1 pts

Look at the Python code below:

class = ["Minh Anh", "Gia Bao", "Manh Cuong", "Le Duc"]

How do you access the first item in an array in Python?

class[0]

minhanh[first]

class[1]

minhanh[1]

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 7/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 17 1 pts

What will be the result of this Python code?

colours = ["red", "blue", "green"]


print(colours[1])

blue

Error

green

red

Question 18 1 pts

Which function in Python converts a string to uppercase?

upper()

lower()

len()

split()

Question 19 1 pts

What will the output be for this Python code?

name = "Jonathan"
print(name.lower())

JONATHAN

jon

jonathan

Jon

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 8/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 20 1 pts

Remember that a prototype is an early version of software or hardware. What does the iterative development of software
prototypes involve?

Writing the entire code at once

Not testing the software

Ignoring user feedback

Developing multiple versions of the software

Question 21 1 pts

Which of the following does NOT help you improve the program development process (how you make programs)?

Checking if the program solves the problem it was supposed to.

Checking if the program was tested to make sure it works.

Reviewing how the program was planned before starting.

Making sure the program was written in one go without any breaks.

Question 22 1 pts

Test data is important because:

Checks if the algorithm is followeded

Checks if the algorithm is wrong

Checks if the algorithm is fast

Checks if the algorithm is invalid

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 9/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 23 1 pts

Which of the following is correct?

Boolean = 1.5

String = 1.5

Real = 1.5

Integer = 1.5

Question 24 1 pts

A program accepts inputs between 1 and 10. What type of test data would the number 5 be?

Extreme data

Invalid data

Boolean data

Normal data

Question 25 1 pts

What type of error occurs when you misspell a Python function? e.g. writing inptu() instead of input()

Runtime error

Boundary error

Logical error

Syntax error

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 10/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 26 1 pts

Which type of error occurs when a program gives the wrong result (although there is no error message)?

Error error

Syntax error

Logical error

Runtime error

Question 27 1 pts

What type of error will occur when the following Python code is run:

num1 = 4
print(num1 * num2)

Runtime error

Syntax error

Boundary error

Logical error

Question 28 1 pts

What is the purpose of a trace table in programming?

To run test cases and define data types

To track the program's variables and debug it

To store data from the program

To run the program

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 11/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 29 3 pts

Look at the Python code below:

Complete the trace table below for an input of 26.

Line Variable Variable Condition Variable Condition Condition


room_capacity num_students num_students<= available_seats available_seats==0 else
room_capacity

8 True

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 12/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

Question 30 3 pts

Look at the Python code below:

Complete the trace table below.

Line Variable Variable Condition Condition Output


numbers n n < 100 else

1 [2,5,390]

5 "small"

5 "small"

6 True

Not saved

Submit quiz

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 13/14
11/18/24, 8:59 AM Quiz: Programming & Computational Thinking 1 - Unit Test

https://lms.vinschool.edu.vn/courses/99717/quizzes/3750505/take?preview=1 14/14

You might also like