• 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 39 pages
Exam (elaborations)

MS Azure D335 ITSW 3126 Intro to Programming with Python OA Review 2025 (Qns & Ans).

Document preview thumbnail
Preview 4 out of 39 pages

MS Azure D335 ITSW 3126 Intro to Programming with Python OA Review 2025 (Qns & Ans).MS Azure D335 ITSW 3126 Intro to Programming with Python OA Review 2025 (Qns & Ans).MS Azure D335 ITSW 3126 Intro to Programming with Python OA Review 2025 (Qns & Ans).

Content preview

MS Azure D335 ITSW 3126 Introduction to
Programming with Python

Objective Assessment Review (Qns & Ans)

2025



Multiple Choice Questions
Which of the following is a feature of Python’s list
comprehension?


A) It can only process integers.
B) It allows for concise construction of lists.
C) It requires a loop syntax.
D) It cannot include conditional statements.
Correct ANS: B
©2025

,Rationale: List comprehension provides a concise way to create
lists using expressions and can include conditional statements.


Which Python data structure is mutable and allows for duplicate
elements?


A) Tuple
B) Set
C) List
D) Dictionary
Correct ANS: C
Rationale: Lists in Python are mutable, meaning they can be
changed after they are created, and they allow for duplicate
elements.


In Python, what is the output of the expression: len("Python")?


A) 5
B) 6
C) 7
D) "Python"
Correct ANS: B
©2025

,Rationale: The len() function returns the number of characters in a
string, which for "Python" is 6.


Which of the following keywords is used to define a function in
Python?


A) function
B) def
C) func
D) define
Correct ANS: B
Rationale: The keyword def is used to define a function in Python.


What will be the output of the following code snippet? print([1, 2,
3] + [4, 5, 6])


A) [1, 2, 3, [4, 5, 6]]
B) [1, 2, 3, 4, 5, 6]
C) Error
D) [4, 5, 6, 1, 2, 3]
Correct ANS: B

©2025

, Rationale: The + operator concatenates two lists together.


Fill-in-the-Blank Questions
In Python, a ________ is a way to create an iterable sequence of
numbers.


Correct ANS: range
Rationale: The range() function generates a sequence of numbers
and is commonly used in for-loops.


The function that converts a string from lowercase to uppercase in
Python is ________.


Correct ANS: upper()
Rationale: The .upper() method is used to convert all characters in
a string to uppercase.


Python uses ________ formatting to allow for dynamic output in
strings, commonly represented by f-strings.


Correct ANS: f-string


©2025

Document information

Uploaded on
April 17, 2025
Number of pages
39
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$12.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.
emiliophd
3.4
(21)
Sold
191
Followers
46
Items
4725
Last sold
1 month 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