100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

WGU D522 Final Exam Review (Latest 2024/ 2025 Update) Python for IT Automation| Qs & As| 100% Correct| Grade A (Verified Answers)

Rating
-
Sold
1
Pages
30
Grade
A+
Uploaded on
16-11-2024
Written in
2024/2025

WGU D522 Final Exam Review (Latest 2024/ 2025 Update) Python for IT Automation| Qs & As| 100% Correct| Grade A (Verified Answers) Q: What built-in data type is used when you assign text to your variable? Answer: str x = "Hello, World!" x = str("Hello, World!") Q: What built-in data type is used when you assign a numeric value to your variable? Answer: int x = 20 x = int(20) float x = 20.5 x = float(20.5) complex x = 1j x = complex(1j) Q: What built-in data type is used when you assign a sequence to your variable? Answer: list x = ["apple", "banana", "cherry"] x = list(("apple", "banana", "cherry")) tuple x = ("apple", "banana", "cherry") x = tuple(("apple", "banana", "cherry")) range x = range(6) Q: What is the difference between a list and a tuple? Answer: list = collection of values tuple = ordered and unchangeable Q: What built-in data type is used when you assign a mapping to your vari- able? Answer: dict x = {"name" : "John", "age" : 36} x = dict(name="John", age=36) Q: What built-in data type is used when you assign a set to your variable? Answer: set x = {"apple", "banana", "cherry"} x = set(("apple", "banana", "cherry")) frozenset x = frozenset({"apple", "banana", "cherry"}) x = frozenset(("apple", "banana", "cherry")) Q: What built-in data type is used when you assign a boolean to your vari- able? Answer: bool x = True x = bool(5) Q: What built-in data type is used when you assign binary to your variable?- Answer: bytes x = b"Hello" x = bytes(5) bytearray x = bytearray(5) memoryview x = memoryview(bytes(5)) Q: What built-in data type is used when you assign the value none to your variable? Answer: nonetype x = none Q: What is Syntax Error? Answer: contains invalid code that cannot be understood Q: What is Indentation Error? Answer: lines of the program are not properly indented Q: What is a Value Error? Answer: invalid value is used (e.g., int(three)) Q: What is a Name Error?

Show more Read less
Institution
WGU D522
Course
WGU D522










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
WGU D522
Course
WGU D522

Document information

Uploaded on
November 16, 2024
Number of pages
30
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

  • what is a name er

Content preview

WGUlD522lFinallExamlReviewl(Latestl
Update)lPythonlforlITlAutomation|lQsl&lAs|
l100%lCorrect|lGradelAl(VerifiedlAnswers)


Q:lWhatlbuilt-inldataltypelislusedlwhenlyoulassignltextltolyourlvariable?
Answer:
lstrlxl=l"Hello,lWorld!"
xl=lstr("Hello,lWorld!")




Q:lWhatlbuilt-inldataltypelislusedlwhenlyoulassignlalnumericlvalueltolyourlvariable?
Answer:
lint
xl=l20
xl=lint(20)
float
xl=l20.5
xl=lfloat(20.5)
complexlxl=l1j
xl=lcomplex(1j)




Q:lWhatlbuilt-inldataltypelislusedlwhenlyoulassignlalsequenceltolyourlvariable?
Answer:
llist
xl=l["apple",l"banana",l"cherry"]
xl=llist(("apple",l"banana",l"cherry"))
tuple
xl=l("apple",l"banana",l"cherry")
xl=ltuple(("apple",l"banana",l"cherry"))
range
xl=lrange(6)

,Q:lWhatlisltheldifferencelbetweenlallistlandlaltuple?
Answer:
llistl=lcollectionloflvaluesltuplel=lorderedlandlunchangeable




Q:lWhatlbuilt-inldataltypelislusedlwhenlyoulassignlalmappingltolyourlvari-lable?
Answer:
ldict
l
xl=l{"name"l:l"John",l"age"l:l36}
xl=ldict(name="John",lage=36)




Q:lWhatlbuilt-inldataltypelislusedlwhenlyoulassignlalsetltolyourlvariable?
Answer:
lsetlxl=l{"apple",l"banana",l"cherry"}
xl=lset(("apple",l"banana",l"cherry"))
frozenset
xl=lfrozenset({"apple",l"banana",l"cherry"})
xl=lfrozenset(("apple",l"banana",l"cherry"))




Q:lWhatlbuilt-inldataltypelislusedlwhenlyoulassignlalbooleanltolyourlvari-lable?
Answer:
lbool
xl=lTrue
xl=lbool(5)




Q:lWhatlbuilt-inldataltypelislusedlwhenlyoulassignlbinaryltolyourlvariable?-

, Answer:
lbytes
xl=lb"Hello"lxl=lbytes(5)
bytearray
xl=lbytearray(5)
memoryview
xl=lmemoryview(bytes(5))




Q:lWhatlbuilt-inldataltypelislusedlwhenlyoulassignlthelvaluelnoneltolyourlvariable?
Answer:
lnonetype
xl=lnone




Q:lWhatlislSyntaxlError?
Answer:
lcontainslinvalidlcodelthatlcannotlbelunderstood




Q:lWhatlislIndentationlError?
Answer:
llinesloflthelprogramlarelnotlproperlylindented




Q:lWhatlislalValuelError?
Answer:
linvalidlvaluelislusedl(e.g.,lint(three))




Q:lWhatlislalNamelError?

Get to know the seller

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.
nurse_steph Rasmussen College
View profile
Follow You need to be logged in order to follow users or courses
Sold
9382
Member since
5 year
Number of followers
5141
Documents
7588
Last sold
5 hours ago
Exams, Study guides, Reviews, Notes

All study solutions.

3.9

1679 reviews

5
846
4
297
3
258
2
77
1
201

Recently viewed by you

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

Frequently asked questions