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

WGU D385 |PA |PRE-ASSESMENT EXAM VERIFIED 2026

Document preview thumbnail
Preview 4 out of 36 pages

WGU D385 |PA |PRE-ASSESMENT EXAM VERIFIED 2026

Content preview

WGU D385 |PA |PRE-ASSESMENT EXAM

Correct 39

Incorrect 00




1 of 39

Term


import logging
import sys
import logging
import sys
#log division by zero error to the log, the output is printed to the
screen
def divideByZeroError(dividend, divisor):
logging.basicConfig(stream=sys.stdout,format='%(levelname)s:%
(message)s')


try:
quotient = dividend/divisor
print (quotient)


except Exception as e:
#logging error here, use str(e) as part of the output
if __name__ == '__main__':
dividend = int(input())

,divisor = int(input())


divideByZeroError(dividend,divisor)


Give this one a try later!



logging.error("The exception t = Template("Hello, my name is $n.")
that occured is: %s", str(e)) print(t.substitute(n=user.name))




return isinstance(wg_int, int)
bucket = self.bucket + (time_passed *
self.rate / self.per)
return wg_string is not None


Don't know?




2 of 39

Term



def authorizeAdmin(usr):
assert isinstance(usr, list) and usr != [], "No user found"
assert 'admin' in usr, "No admin found."
print("You are granted full access to the application.")


If __name__ == '__main__':
authorizeAdmin(['user'])



Give this one a try later!



ValueError: Empty user list TypeError: Invalid user type

, AssertionError: No admin
AssertionError: No user found
found


Don't know?




3 of 39

Term



Which method is used for a SQL injection attack?



Give this one a try later!



Exploiting query parameters Passing safe query parameters




Overloading server resources Manipulating session cookies


Don't know?




4 of 39

Term



404



Give this one a try later!



403 Ok

, Not Found Found 10

Don't know?




5 of 39

Term



import requests
url = 'https://api.github.com/invalid'


try:
request_response = requests.get(url)


# If the response was successful, no Exception will be raised
request_response.raise_for_status()
except Exception as err:
print(f'Other error occurred: {err}')
else:
print('Success!')



Give this one a try later!



200 - ok 401 - Not Authorized




500 - Server Error 404 - Not Found


Don't know?




6 of 39

Document information

Uploaded on
January 31, 2026
Number of pages
36
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.79

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

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CLOUND
3.9
(128)
Sold
657
Followers
389
Items
12130
Last sold
5 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