
PCEP Practice Exam 2
Authored by Henry Vo
Religious Studies
10th Grade
Used 31+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec ⢠1 pt
What do you expect the following code will print given the first input is
apple (stored in variable a) and the second input is banana (stored in
variable b)?
apple:banana
apple::banana
banana:apple:
banana::apple
Answer explanation
The inputs were swapped duing the assignment. x is assigned the value stored inside b, and y is assigned the value stored inside a.
2.
MULTIPLE CHOICE QUESTION
30 sec ⢠1 pt
What will the output be after running the following code snippet?
0
4
2
1
Answer explanation
The if clause inside myfun will evaluate to true since the value passed to the function is >= 4. The if block will then be executed, and the value of 4 will be returned.
3.
MULTIPLE CHOICE QUESTION
30 sec ⢠1 pt
What will the output be after running the following code snippet?
['bananas', '']
['bananas']
['apples']
['apples', 'bananas', '']
Answer explanation
The element 'bananas' will be removed from the list, and will be replaced by empty element at its position.
4.
MULTIPLE CHOICE QUESTION
30 sec ⢠1 pt
What will the output be after running the following code snippet?
[7, 6, 5, 4, 3, 2, 1]
[1, 2, 3, 4, 5, 6, 7]
[1, 2, 3, 4, 5, 6]
[2, 3, 4, 5, 6, 7]
Answer explanation
The answer is [7, 6, 5, 4, 3, 2, 1]. The symbol [:] accesses all elements in the list. [::-1] accesses all elements in the list but in reverse order.
5.
MULTIPLE CHOICE QUESTION
30 sec ⢠1 pt
What will the output be after running the following code snippet?
0b01
0b11
0b10
10
Answer explanation
The XOR (^) evaluates to 1 if either of the bits are 1. If both bits are 0 or both bits are 1, it retuns 1. We represent binary numbers with prefix of 0b.
6.
MULTIPLE CHOICE QUESTION
30 sec ⢠1 pt
What is the output of the following program?
1
9
10
90
Answer explanation
The answer is 90. The inner loop iterates 9 times and the outer loop iterates 10 times for every iteration of the outer loop. So the answer is 9*10=90.
7.
MULTIPLE CHOICE QUESTION
30 sec ⢠1 pt
What will the output be after running the following code snippet?
Not equal
Equal
False
True
Answer explanation
Elements at each position in each list are compared in order when using the ==. In this example, the elements differ.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
25 questions
The Holy Mass
Quiz
ā¢
7th - 12th Grade
25 questions
5 Seconds - Bible Books
Quiz
ā¢
5th Grade - University
25 questions
Surah Anfaal MCQs
Quiz
ā¢
9th - 10th Grade
30 questions
Moral Action and Conscience Review
Quiz
ā¢
9th - 12th Grade
25 questions
Mahant Swami Maharaj's Ruchi
Quiz
ā¢
KG - Professional Dev...
25 questions
World Views
Quiz
ā¢
10th Grade
25 questions
Cause & Effect-1.2 & 1.3 Fundamentals worksheet #2
Quiz
ā¢
10th Grade - University
26 questions
CP Unit 5 Test
Quiz
ā¢
10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
ā¢
3rd Grade
20 questions
Equivalent Fractions
Quiz
ā¢
3rd Grade
25 questions
Multiplication Facts
Quiz
ā¢
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
ā¢
9th Grade
22 questions
fractions
Quiz
ā¢
3rd Grade
11 questions
FOREST Effective communication
Lesson
ā¢
KG
20 questions
Main Idea and Details
Quiz
ā¢
5th Grade
20 questions
Context Clues
Quiz
ā¢
6th Grade
Discover more resources for Religious Studies
20 questions
-AR -ER -IR present tense
Quiz
ā¢
10th - 12th Grade
10 questions
Cell Organelles and Their Functions
Interactive video
ā¢
6th - 10th Grade
22 questions
El Imperfecto
Quiz
ā¢
9th - 12th Grade
20 questions
SSS/SAS
Quiz
ā¢
9th - 12th Grade
20 questions
verbos reflexivos en espaƱol
Quiz
ā¢
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
ā¢
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
ā¢
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
ā¢
9th - 12th Grade