PCEP Practice Exam 2

PCEP Practice Exam 2

10th Grade

30 Qs

quiz-placeholder

Similar activities

TOB Test #3

TOB Test #3

10th Grade

25 Qs

The Way - a movie about the Camino de Santiago

The Way - a movie about the Camino de Santiago

8th - 10th Grade

25 Qs

Section D Question Of faith quiz jc

Section D Question Of faith quiz jc

7th - 10th Grade

25 Qs

Church Final Exam Review - Part 1

Church Final Exam Review - Part 1

9th - 10th Grade

26 Qs

Hebrews 1-5 by Maria Anthuvan M

Hebrews 1-5 by Maria Anthuvan M

6th Grade - Professional Development

25 Qs

SOIL BIble Study

SOIL BIble Study

9th Grade - University

34 Qs

Introduction to Sacred Scripture Study Guide

Introduction to Sacred Scripture Study Guide

9th - 12th Grade

28 Qs

Bible Trivia #1

Bible Trivia #1

6th - 12th Grade

25 Qs

PCEP Practice Exam 2

PCEP Practice Exam 2

Assessment

Quiz

Religious Studies

10th Grade

Practice Problem

Medium

Created by

Henry Vo

Used 29+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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.

Create a free account and access millions of resources

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?