Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 50 pages
Exam (elaborations)

LATEST PYTHON CERTIFICATION EXAM OFFERED BY PYTHON INSTITUTE | Q&A WITH RATIONALES

Document preview thumbnail
Preview 4 out of 50 pages

LATEST PYTHON CERTIFICATION EXAM OFFERED BY PYTHON INSTITUTE | Q&A WITH RATIONALES

Content preview

LATEST PYTHON CERTIFICATION
EXAM OFFERED BY PYTHON
INSTITUTE | Q&A WITH
RATIONALES



PCEP-30-02 Exam

Block 1: Computer Programming and Python
Fundamentals (18%)

1. What is the output of the following code?

python
print()
print(type(4 // 2.0))


A) 2 <class 'int'>
B) 2.0 <class 'float'>
C) 2 <class 'float'>
D) 2.0 <class 'int'>

Correct answer: B
Rationale: returns a float (2.0). 4 // 2.0 performs floor division on a float,
returning a float (2.0).

,2. Which of the following are valid Python keywords? (Select two.)
A) def
B) function
C) import
D) include

Correct answer: A, C
Rationale: def is used to define functions, and import is used to import
modules. function and include are not Python keywords.




3. What is the result of 0b1111 in decimal?
A) 8
B) 12
C) 15
D) 16

Correct answer: C
Rationale: 0b1111 is binary for 15 (8 + 4 + 2 + 1).




4. What is the output of the following code?

python
x = 5
y = 2
print(x ** y)


A) 7
B) 10

,C) 25
D) 32

Correct answer: C
Rationale: ** is the exponentiation operator. 5 ** 2 = 25.




5. Which of the following variable names is NOT valid in Python?
A) _my_var
B) myVar2
C) 2myVar
D) my_var

Correct answer: C
Rationale: Variable names cannot start with a digit.




6. What is the output of the following code?

python
print(3 * "abc")


A) abcabcabc
B) abc abc abc
C) 3abc
D) Error

Correct answer: A
Rationale: The * operator repeats strings. 3 * "abc" produces "abcabcabc".

, 7. Which operator is used for floor division in Python?
A) /
B) %
C) //
D) **

Correct answer: C
Rationale: // performs floor division, returning the integer part of the quotient.




8. What is the result of 5 % 2?
A) 2.5
B) 2
C) 1
D) 0

Correct answer: C
Rationale: % is the modulo operator, returning the remainder of the division. 5 % 2
= 1.




9. Which of the following statements about Python indentation is TRUE?
A) Indentation is optional
B) Indentation defines blocks of code
C) Indentation is only for readability
D) Indentation uses curly braces

Document information

Uploaded on
June 18, 2026
Number of pages
50
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$22.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
IsaacRobie
4.0
(78)
Sold
341
Followers
156
Items
4368
Last sold
1 week ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions