• 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 2 out of 7 pages
Exam (elaborations)

WGU D522 Python for IT Automation Cram Sheet Questions With Correct Answers A+ Graded

Document preview thumbnail
Preview 2 out of 7 pages

WGU D522 Python for IT Automation Cram Sheet Questions With Correct Answers A+ Graded

Content preview

WGU D522 Python for IT Automation Cram Sheet
Questions With Correct Answers A+ Graded 2026-2027
print(x) - CORRECT ANSWER -Outputs text or variables to the console.



input(prompt) - CORRECT ANSWER -Prompts and retrieves user input as a string.



len(x) - CORRECT ANSWER -Returns the number of items in a sequence or collection.



type(x) - CORRECT ANSWER -Returns the data type of the specified object.



range(start, stop, step) - CORRECT ANSWER -Generates a sequence of numbers, commonly used
in loops.



enumerate(iterable) - CORRECT ANSWER -Returns index and value pairs during iteration.



zip(a, b) - CORRECT ANSWER -Combines multiple iterables element-wise into tuples.



sorted(iterable) - CORRECT ANSWER -Returns a new sorted list from the items in an iterable.



sum(list) - CORRECT ANSWER -Adds all numerical items in an iterable.



min() and max() - CORRECT ANSWER -Return the smallest and largest values in an iterable.



abs(x) - CORRECT ANSWER -Returns the absolute value of a number.



round(x, n) - CORRECT ANSWER -Rounds a number to n decimal places.

, isinstance(x, type) - CORRECT ANSWER -Checks if an object is an instance of a specified class.



hasattr(obj, name) - CORRECT ANSWER -Checks if an object has a specified attribute or method.



str(), int(), float(), bool() - CORRECT ANSWER -Functions used for explicit data type conversion.



dict(), list(), tuple(), set() - CORRECT ANSWER -Constructor functions used to build or convert
data structures.



.strip() - CORRECT ANSWER -Removes whitespace from both ends of a string.



.lstrip() and .rstrip() - CORRECT ANSWER -Remove whitespace from the left or right side of a
string.



.lower() and .upper() - CORRECT ANSWER -Convert a string to all lowercase or all uppercase.



.title() and .capitalize() - CORRECT ANSWER -Convert string to titlecase or capitalize only the first
character.



.find(sub) - CORRECT ANSWER -Returns the lowest index of a substring, or -1 if not found.



.rfind(sub) - CORRECT ANSWER -Returns the highest index of a substring, or -1 if not found.



.startswith(prefix) - CORRECT ANSWER -Returns True if the string starts with the specified prefix.



.endswith(suffix) - CORRECT ANSWER -Returns True if the string ends with the specified suffix.

Document information

Uploaded on
September 15, 2026
Number of pages
7
Written in
2026/2027
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

Sold
2
Followers
0
Items
218
Last sold
6 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