Docsity

TIPS FOR WGU D522 Python for IT Automation OBJECTIVE ASSESSMENT 2026 || Python for IT Auto, Exams of Advanced Education

Toggle sidebar
bg1
Don't give up now! Trust the process.
Your time: 1 min
0%
Correct
Incorrect
0
61
Your answers
Term
What does this built in Python function do?: open(), read(), write()
1 of 61
Term
What does this built in Python function do?: input()
2 of 61
Give this one a try later!
returns a sorted list from an iterable
handles file I/O operations
outputs text or variables to the console
reads user input from the console
Don't know?
Give this one a try later!
reads user input from the console
outputs text or variables to the console
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download TIPS FOR WGU D522 Python for IT Automation OBJECTIVE ASSESSMENT 2026 || Python for IT Auto and more Exams Advanced Education in PDF only on Docsity!

Don't give up now! Trust the process.

Your time: 1 min

Correct

Incorrect

Your answers

Term

What does this built in Python function do?: open(), read(), write()

1 of 61

Term

What does this built in Python function do?: input()

2 of 61

Give this one a try later!

returns a sorted list from an iterable handles file I/O operations

outputs text or variables to the console reads user input from the console

Don't know?

Give this one a try later!

reads user input from the console outputs text or variables to the console

Term

What does Python use to define the scope of control flow statements

and structures like functions and classes?

3 of 61

Term

What does this built in Python function do?: dir()

4 of 61

converts a value to an integer returns the maximum value from a sequence

Don't know?

Give this one a try later!

Selection Indentation

Casting Parenthesis

Don't know?

Give this one a try later!

lists the modules imported in the current session

lists the keywords in the python language

lists the names in the current scope or attributes of an object lists the files in the current directory

Term

How can a global variable be created inside a function in Python?

7 of 61

Term

What are the traits of Logic Programming?

8 of 61

Don't know?

Give this one a try later!

By initializing the variable outside the function scope

By declaring the variable with the 'nonlocal' keyword

By declaring the variable with the 'global' keyword

By assigning the variable inside a class definition

Don't know?

Give this one a try later!

organizes code around objects that encapsulate data and behavior

defines a set of logical conditions and lets the system deduce solutions.

describes what the program should accomplish without specifying how

focuses on the step-by-step execution flow of a program

Term

Which Python data type represents an ordered, mutable sequence?

9 of 61

Term

What does this built in Python function do?: sorted()

10 of 61

Don't know?

Give this one a try later!

'list' a python error occurs. (must use variables of the same type)

local scope unordered, mutable collection of unique elements. {1,2,3}

Don't know?

Give this one a try later!

returns a sorted list from an iterable returns a unique list from an iterable

returns a reversed list from an iterable returns a tuple from an iterable

Don't know?

Term

What does the 'strip()' method do in Python?

13 of 61

· Stop: the index at which the slicing ends (exclusive) · Step (optional): The step or stride between characters.

It take the exponent of the value applied to it.

It reverses the string.

The 'step' portion of the slice is negative, indicating the stride between characters is reversed.

Don't know?

Give this one a try later!

It splits the string into a list based on whitespace

It removes leading and trailing whitespaces from a string

It replaces leading and trailing whitespaces with underscores

It removes all whitespace characters from a string

Don't know?

Term

What happens when an operation is performed that involves both an int

and a float in Python?

14 of 61

Term

What does the 'round(x, n) function do in Python?

15 of 61

16 of 61

Give this one a try later!

the result is automatically promoted to a 'float'

a typeerror occurs because the types are incompatible

the result is automatically converted to a 'string'

the result is automatically truncated to an 'int'

Don't know?

Give this one a try later!

it rounds 'x' to 'n' decimal places it calculates the square root of 'x' to 'n' decimal places

it rounds 'x' to the nearest integer it truncates 'x' to 'n' decimal places

Don't know?

Term

What is a 'shallow copy' of a list in Python?

18 of 61

Term

What does this built in Python function do?: len()

19 of 61

my_list = [1, 2, 3] my_list.append([4, 5]) # Appending a list as a single element print(my_list) # Output: [1, 2, 3, [4, 5]] Don't know?

Give this one a try later!

A copy of the list where changes to the copied list do not affect the original list.

A copy of the list that is identical to the original list in memory.

A copy of the list that contains only the first half of the original list's elements.

A copy of the list where changes to the copied list also affect the original list.

Don't know?

Give this one a try later!

determines the length of a sequence (string, list, tuple) returns the type of an object

outputs text or variables to the console reads user input from the console

Term

What does this built in Python function do?: max(), min()

20 of 61

Term

What are the 3 components of a string slice?

21 of 61

Don't know?

Give this one a try later!

converts values to integers, floats, or strings; respectively returns the type of an object

returns the maximum or minimum value from a sequence

determines the length of a sequence (string, list, tuple)

Don't know?

Give this one a try later!

Camel case: each word, except for the first word, starts with a capital letter

Pascal case: each word starts with a capital letter

Snake case: each word in the variable is separated by an underscore.

describes what the program should accomplish without specifying how to achieve it.

Term

What is the purpose of the // operator in Python?

23 of 61

Term

What are the 3 sequence types in Python? what do they represent/look

like?

24 of 61

Give this one a try later!

It performs floor division operation;

performs division and rounds down to the nearest whole number and discards the decimal part

It reverses the string.

The 'step' portion of the slice is negative, indicating the stride between characters is reversed.

It enhances output formatting by embedding variables in strings. (although 'f' strings are easier to read)

It returns the remainder of the division of two numbers.

Don't know?

Give this one a try later!

Camel case: each word, except for the first word, starts with a capital letter

Pascal case: each word starts with a capital letter

Snake case: each word in the variable is separated by an underscore.

Term

what does the += operator do in Python string manipulation?

25 of 61

It performs floor division operation;

performs division and rounds down to the nearest whole number and discards the decimal part

string [start:stop:step]

· Start: the index from which the slicing begins (inclusive) · Stop: the index at which the slicing ends (exclusive) · Step (optional): The step or stride between characters.

list: Ordered, mutable sequence; [1,23] tuple: Ordered, immutable sequence; (1,2,3) range: represents a range of values; e.g. range(5)

Don't know?

Give this one a try later!

It is used to multiply a string by an integer

It is used to compare two strings for equality

It is used to add a space between two strings

It is used as a shorthand for concatenation and assignment

Don't know?

Term

what is a dictionary mapping type?

Term

What does this built in Python function do?: print()

29 of 61

Give this one a try later!

It performs floor division operation;

performs division and rounds down to the nearest whole number and discards the decimal part

describes what the program should accomplish without specifying how to achieve it.

an unordered collection of key- value pairs.

my_dict = {'key':'value', 'name':'John'}

Truthy values are non-zero numbers and non-empty strings.

Falsy values are zero, None, and empty strings

Don't know?

Give this one a try later!

calculates the length of a sequence returns the type of an object

reads user input from the console outputs text or variables to the console

Term

What does the arithmatic operator **= do?

30 of 61

Term

What are the 3 common naming conventions used in Python, and what is

their format?

31 of 61

Don't know?

Give this one a try later!

It adds the exponent to the value applied to it.

It takes the square root of the value applied to it.

It multiplies the value applied to it by itself.

It take the exponent of the value applied to it.

Don't know?

Give this one a try later!

Camel case: each word, except for the first word, starts with a capital letter

Pascal case: each word starts with a capital letter

Snake case: each word in the variable is separated by an underscore.

Give this one a try later!

Give this one a try later!

Give this one a try later!

Give this one a try later!

To define blocks of code

What are truthy and falsy values in Python?

Truthy values are non-zero numbers and non-empty strings.

Falsy values are zero, None, and empty strings

What does this built in Python function do?: any(), all()

checks if any or all elements in an iterable are true

What is the primary use of whitespace in Python?

To define the structure and hierarchy of the code

What is a characteristic of Python as a dynamically-typed language?

Give this one a try later!

Give this one a try later!

Give this one a try later!

The interpreter determines the type of variable during runtime

What does this built in Python function do?: map(), filter()

applies a function to elements or filters elements based on a function

What does the string slicing operation 'text {::-1] do where text = "Hello, Python!"?

It reverses the string.

The 'step' portion of the slice is negative, indicating the stride between characters is reversed.

What are the 5 Variable name rules in Python?

  1. can only contain letters, numbers, or an underscore.
  2. MUST start with either a letter or underscore
  3. Cannot start with a number
  4. Cannot contain special characters.
  5. Cannot be a Python keyword (such as: and, as, def, else, etc)

What does the format() method do in Python?