D522 / D 522 Objective Assessment (Latest Update 2025 / 2026) Python for IT Automation | Questions and Answers | 100% Correct | Grade A (Verified Answers) - WGU
Question:
Which Python collection is best suited for storing an ordered sequence of elements that can be changed?
Answer:
Lists
Question:
Consider a tuple t = (1, 2, 3, 4, 5). What will be the output of 6 in t?
Answer:
False
- / 4
Question:
Consider the Python code:
fruits = ['apple', 'banana', 'cherry'] fruits[1] = 'blueberry' What will be the value of fruits after executing this code?
Answer:
['apple', 'blueberry', 'cherry']
Question:
Consider the following Python code:
numbers = [1, 2, 3, 4, 5] numbers[1:3] = [7, 8]
What will be the value of numbers after executing this code?\
Answer:
[1, 7, 8, 4, 5]
- / 4
Question:
Consider the following Python code:
colors = ['red', 'blue', 'green'] colors.insert(1, 'yellow')
What will be the value of colors after executing this code?
Answer:
['red', 'yellow', 'blue', 'green']
Question:
Consider the following Python code:
animals = ['cat', 'dog', 'bird'] animals.append('fish') What will be the value of animals after executing this code?
Answer:
['cat', 'dog', 'bird', 'fish']
- / 4
Question:
Consider the following Python code:
letters = ['a', 'b', 'c'] letters.extend(['d', 'e']
What will be the value of letters after executing this code?
Answer:
['a', 'b', 'c', 'd', 'e']
Question:
What does it mean to say that Python is dynamically typed?
Answer:
It means variable types in Python are determined at runtime.
Question:
What is the primary focus of the Object-Oriented Programming (OOP) paradigm?
Answer:
It reacts to events and user actions, triggering corresponding functions.
- / 4