100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
WGU D522 PYTHON EXAM ACTUAL EXAM LATEST UPDATE THIS YEAR COMPLETE 300 QUESTIONS AND CORRECT ANSWERS ALREADY GRADED A+ $27.99   Add to cart

Exam (elaborations)

WGU D522 PYTHON EXAM ACTUAL EXAM LATEST UPDATE THIS YEAR COMPLETE 300 QUESTIONS AND CORRECT ANSWERS ALREADY GRADED A+

 0 view  0 purchase
  • Course
  • WGU D522 PYTHON .
  • Institution
  • WGU D522 PYTHON .

WGU D522 PYTHON EXAM ACTUAL EXAM LATEST UPDATE THIS YEAR COMPLETE 300 QUESTIONS AND CORRECT ANSWERS ALREADY GRADED A+

Preview 4 out of 51  pages

  • November 17, 2024
  • 51
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • WGU D522 PYTHON .
  • WGU D522 PYTHON .
avatar-seller
STUVIAGRADES
Page 1 of 51




WGU D522 PYTHON EXAM ACTUAL EXAM LATEST UPDATE
THIS YEAR COMPLETE 300 QUESTIONS AND CORRECT
ANSWERS ALREADY GRADED A+
WGU D522

What built-in data type is used when you assign text to your variable?

str
x = "Hello, World!"
x = str("Hello, World!")

What built-in data type is used when you assign a numeric value to your variable?

int
x = 20
x = int(20)


float
x = 20.5
x = float(20.5)


complex
x = 1j
x = complex(1j)

What built-in data type is used when you assign a sequence to your variable?

list
x = ["apple", "banana", "cherry"]


1

,Page 2 of 51




x = list(("apple", "banana", "cherry"))


tuple
x = ("apple", "banana", "cherry")
x = tuple(("apple", "banana", "cherry"))


range
x = range(6)

What is the difference between a list and a tuple?

list = collection of values
tuple = ordered and unchangeable

What built-in data type is used when you assign a mapping to your variable?

dict
x = {"name" : "John", "age" : 36}
x = dict(name="John", age=36)

What built-in data type is used when you assign a set to your variable?

set
x = {"apple", "banana", "cherry"}
x = set(("apple", "banana", "cherry"))


frozenset
x = frozenset({"apple", "banana", "cherry"})
x = frozenset(("apple", "banana", "cherry"))

What built-in data type is used when you assign a boolean to your variable?


2

,Page 3 of 51




bool
x = True
x = bool(5)

What built-in data type is used when you assign binary to your variable?

bytes
x = b"Hello"
x = bytes(5)


bytearray
x = bytearray(5)


memoryview
x = memoryview(bytes(5))

What built-in data type is used when you assign the value none to your variable?

nonetype
x = none

print(10 > 9)
print(10 == 9)
print (10 < 9)

Boolean

print(bool("Hello"))
print(bool("15"))
print(bool(x))




3

, Page 4 of 51




Boolean examples of True

print(bool(False))
print( )
print(0)

Boolean examples of False

print(isinstance(x, int))

determine if an object is of a certain data type

int( )

casts an integer from an integer literal, float literal, or string literal

float( )

casts a float from an integer literal, a float literal, or a string literal

str( )

casts a string from strings, integer literals, or a float literals

print("text")

outputs text to the console

print("text", end=" ")
print("more text")

will end with a space and continue on the same line ("text more text")

print("Wage", wage)



4

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller STUVIAGRADES. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $27.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75632 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$27.99
  • (0)
  Add to cart