• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 48 pages
Exam (elaborations)

D335 Introduction To Programming In Python Pre Assessment & Performance Assessment Practice Exam Questions And Correct Answers (Verified Answers) Plus Rationales 2026 Q&A | Instant Download Pdf.

Document preview thumbnail
Preview 4 out of 48 pages

D335 INTRODUCTION TO PROGRAMMING IN PYTHON PRE ASSESSMENT & PERFORMANCE ASSESSMENT PRACTICE EXAM QUESTIONS AND CORRECT ANSWERS (VERIFIED ANSWERS) PLUS RATIONALES 2026 Q&A | INSTANT DOWNLOAD PDF.

Content preview

D335 INTRODUCTION TO
PROGRAMMING IN PYTHON PRE-
ASSESSMENT & PERFORMANCE
ASSESSMENT PRACTICE EXAM
QUESTIONS AND CORRECT ANSWERS
(VERIFIED ANSWERS) PLUS RATIONALES
2026 Q&A | INSTANT DOWNLOAD PDF.
Core Domains:
Python Fundamentals and Syntax
Variables, Data Types, and Operators
Input/Output Operations (print(), input())
Control Flow (if/elif/else conditional statements)
Iteration (for loops, while loops)
Functions and Modular Programming
Data Structures (Lists, Tuples, Dictionaries, Sets)
String Manipulation and Methods
File Handling (Reading from and Writing to Files)
Exception Handling (try/except blocks)
List Comprehensions and Advanced Operations
Object-Oriented Programming Basics (Classes and Objects)
Introduction
This comprehensive examination is designed to evaluate the candidate's
mastery of introductory Python programming concepts essential for
success in the D335 course and the Objective Assessment (OA). The
assessment covers Python fundamentals, variables and data types, control
flow, loops, functions, data structures, string manipulation, file handling,
and exception handling. Through a combination of multiple-choice
questions, code snippet analysis, and scenario-based problems,

,candidates will demonstrate their ability to read, write, and debug Python
code, apply programming logic to solve problems, and understand key
Python concepts. Special emphasis is placed on practical coding skills,
common pitfalls, and the application of Python in real-world scenarios.


SECTION ONE: QUESTIONS 1-100
Question 1
What is the output of the following Python code?
python
print(type(3.14))
A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. <class 'bool'>

B. <class 'float'>

RATIONALE: The type() function returns the data type of the
argument. 3.14 is a floating-point number, so type(3.14) returns <class
'float'>. Integers are whole numbers without a decimal point, strings are
text enclosed in quotes, and booleans are True or False.


Question 2
Which of the following is an immutable data type in Python?
A. List
B. Dictionary
C. Tuple
D. Set

C. Tuple

, RATIONALE: Tuples are immutable, meaning their elements cannot
be changed after creation. Lists, dictionaries, and sets are mutable and
can be modified after creation.


Question 3
What is the output of the following code?
python
x=5
y=2
print(x // y)
A. 2.5
B. 2
C. 3
D. 2.0

B. 2

RATIONALE: The // operator performs floor division, which divides
the first number by the second and rounds down to the nearest whole
number. 5 // 2 equals 2. The / operator would return 2.5.


Question 4
Which of the following correctly creates an empty list in Python?
A. list = ()
B. list = []
C. list = {}
D. list = [ ]

B. list = []

, RATIONALE: An empty list is created using square brackets [].
Parentheses () create an empty tuple, and curly braces {} create an
empty dictionary.


Question 5
What is the output of the following code?
python
print("Hello" + " " + "World")
A. HelloWorld
B. Hello World
C. "Hello World"
D. Hello + World

B. Hello World

RATIONALE: The + operator concatenates strings. "Hello" + " " +
"World" results in the string "Hello World" with a space between the
words.


Question 6
Which statement is used to handle exceptions in Python?
A. catch
B. except
C. error
D. handle

B. except

RATIONALE: Exceptions in Python are handled
using try and except blocks. The except block catches and handles
exceptions that occur in the try block.

Document information

Uploaded on
August 29, 2026
Number of pages
48
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$28.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.
BestwriterGuru
4.8
(725)
Sold
254
Followers
34
Items
5502
Last sold
2 days 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