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

WGU D522 Python for IT Automation (SKO1): The Complete -Question Q&A Study Guide with Detailed Rationales

Document preview thumbnail
Preview 4 out of 37 pages

WGU D522 Python for IT Automation (SKO1): The Complete -Question Q&A Study Guide with Detailed Rationales WGU D522 Python for IT Automation (SKO1): The Complete -Question Q&A Study Guide with Detailed Rationales

Content preview

WGU D522 Python for IT Automation
(SKO1): The Complete -Question Q&A
Study Guide with Detailed Rationales


Domain I: Python Fundamentals – Syntax, Variables, Data Types, and
Operators (Questions 1-20)

Q1: What does Python syntax refer to?
A) The runtime environment for executing Python code
B) The set of rules that dictate valid combinations of symbols and keywords
C) The process of converting code to machine language
D) The standard library of built-in modules

Correct Answer: B

Rationale: Python syntax is the set of rules governing how symbols and
keywords combine to form valid programs. Syntax rules cover variable
naming, statement structure, and overall code organization.

Q2: What is the purpose of indentation in Python?
A) To enhance visual appearance
B) To define blocks of code
C) To separate different modules
D) To indicate the end of a program

Correct Answer: B

,Rationale: Unlike languages that use braces {}, Python uses indentation
(spaces or tabs at line starts) to define code blocks. Consistent indentation
is syntactically required.

Q3: What is the output of print("5" + "3")?
A) 8
B) 53
C) 15
D) TypeError

Correct Answer: B

Rationale: The + operator performs string concatenation when both
operands are strings. "5" and "3" are joined to produce "53". No
arithmetic occurs.

Q4: What is the result of 17 // 4?
A) 4.25
B) 4
C) 5
D) 1

Correct Answer: B

Rationale: The // operator performs floor division (integer division),
discarding the remainder. 17 // 4 = 4 because 17 divided by 4 is 4.25,
floored to 4.

Q5: What is the result of 7 % 3?
A) 2.33
B) 2
C) 1
D) 0

,Correct Answer: C

Rationale: The % operator computes the remainder after division. 7 % 3 =
1 because 3 goes into 7 twice (6) with a remainder of 1.

Q6: Which statement checks if variable age is between 18 and 65
inclusive?
A) 18 <= age <= 65
B) age >= 18 and age =< 65
C) age in range(18, 65)
D) 18 <= age < 65

Correct Answer: A

Rationale: Python supports chained comparisons. 18 <= age <=
65 checks both conditions in a single expression. Option C would exclude
65 (range stops before stop value).

Q7: What does the bool() function return for an empty string?
A) True
B) False
C) None
D) Error

Correct Answer: B

Rationale: Empty sequences (strings, lists, tuples) evaluate to False in a
boolean context. Non-empty strings evaluate to True.

Q8: Which operator is used for exponentiation?
A) ^
B) **
C) //
D) *

, Correct Answer: B

Rationale: ** is the exponentiation operator (e.g., 2**3 = 8). ^ is the
bitwise XOR operator, not exponentiation.

Q9: What is the output of print(3 * "Hi")?
A) HiHiHi
B) 3Hi
C) Hi
D) TypeError

Correct Answer: A

Rationale: The * operator repeats a string when used with an integer. "Hi"
* 3 produces "HiHiHi".

Q10: Which function returns the length of a list?
A) length()
B) count()
C) len()
D) size()

Correct Answer: C

Rationale: len() is the built-in function to return the number of items in a
container (list, tuple, string, dictionary, etc.).

Q11: What data type is produced by input("Enter age: ")?
A) int
B) float
C) str
D) bool

Correct Answer: C

Document information

Uploaded on
August 25, 2026
Number of pages
37
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
CA$31.56

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

Sold
4
Followers
0
Items
907
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