WGU D522 PYTHON FOR IT AUTOMATION
UPDATED ACTUAL QUESTIONS WITH CORRECT
ANSWERS
Question 1.
break
ANSWER
used to exit a loop prematurely.
Question 2.
conditional statements
ANSWER
if, else, elif (else if)
Question 3.
you can modify strings with
ANSWER
replace ()
upper ()
lower ()
Question 4.
del
ANSWER
delete objects.
Question 5.
declarative programming
ANSWER
describes what the program should accomplish without specifying how to achieve it
,Question 6.
abs ()
ANSWER
returns the absolute value of a number
Question 7.
bitwise OR |
ANSWER
lowest precendence
Question 8.
first for cloud automation
ANSWER
pip install boto3
Question 9.
extend ()
ANSWER
used to add multile items to the end of a list.
Question 10.
semantic error
ANSWER
program runs without crashing but doesn't produce the expected output could be error in the
programs logic.
Question 11.
continue
ANSWER
used in loops to skip the rest of the current iteration and move directly to the next one.
,Question 12.
python module
ANSWER
a file containing Python definitions and statements
Question 13.
debugging steps
ANSWER
understanding the problem
isolating the problem
use debugger
fix error
test solution
Question 14.
(f-strings)
ANSWER
stands for format. Replaces the name of any variable in braces with its value.
Question 15.
set:
ANSWER
unordered, mutable collection of unique elements
Question 16.
\n
\t
ANSWER
new line
new tab
, Question 17.
third party libraries
ANSWER
paramiko, netmikp
Question 18.
object-oriented programming (OOP)
ANSWER
organizes code around objects, which encapsulate data and behavior
Question 19.
you can combine lists together with
ANSWER
+ operator
also by using extend ()
Question 20.
default parameter values
ANSWER
value that is assigned to a function parameter when the function is defined.
Question 21.
indentation
ANSWER
defines blocks of code. crucial for structure and nesting of code blocks
(4 spaces)
UPDATED ACTUAL QUESTIONS WITH CORRECT
ANSWERS
Question 1.
break
ANSWER
used to exit a loop prematurely.
Question 2.
conditional statements
ANSWER
if, else, elif (else if)
Question 3.
you can modify strings with
ANSWER
replace ()
upper ()
lower ()
Question 4.
del
ANSWER
delete objects.
Question 5.
declarative programming
ANSWER
describes what the program should accomplish without specifying how to achieve it
,Question 6.
abs ()
ANSWER
returns the absolute value of a number
Question 7.
bitwise OR |
ANSWER
lowest precendence
Question 8.
first for cloud automation
ANSWER
pip install boto3
Question 9.
extend ()
ANSWER
used to add multile items to the end of a list.
Question 10.
semantic error
ANSWER
program runs without crashing but doesn't produce the expected output could be error in the
programs logic.
Question 11.
continue
ANSWER
used in loops to skip the rest of the current iteration and move directly to the next one.
,Question 12.
python module
ANSWER
a file containing Python definitions and statements
Question 13.
debugging steps
ANSWER
understanding the problem
isolating the problem
use debugger
fix error
test solution
Question 14.
(f-strings)
ANSWER
stands for format. Replaces the name of any variable in braces with its value.
Question 15.
set:
ANSWER
unordered, mutable collection of unique elements
Question 16.
\n
\t
ANSWER
new line
new tab
, Question 17.
third party libraries
ANSWER
paramiko, netmikp
Question 18.
object-oriented programming (OOP)
ANSWER
organizes code around objects, which encapsulate data and behavior
Question 19.
you can combine lists together with
ANSWER
+ operator
also by using extend ()
Question 20.
default parameter values
ANSWER
value that is assigned to a function parameter when the function is defined.
Question 21.
indentation
ANSWER
defines blocks of code. crucial for structure and nesting of code blocks
(4 spaces)