100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
WGU D522 PYTHON EXAM WITH COMPLETE 200 QUESTIONS AND DETAILED SOLUTIONS LATEST UPDATE THIS YEAR $27.99   Add to cart

Exam (elaborations)

WGU D522 PYTHON EXAM WITH COMPLETE 200 QUESTIONS AND DETAILED SOLUTIONS LATEST UPDATE THIS YEAR

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

WGU D522 PYTHON EXAM WITH COMPLETE 200 QUESTIONS AND DETAILED SOLUTIONS LATEST UPDATE THIS YEAR

Preview 4 out of 60  pages

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



WGU D522 PYTHON EXAM WITH COMPLETE 200
QUESTIONS AND DETAILED SOLUTIONS LATEST
UPDATE THIS YEAR
WGU D522 Python


What is Syntax Error?


contains invalid code that cannot be understood


What is Indentation Error?


lines of the program are not properly indented


What is a Value Error?


invalid value is used (e.g., int(three))


What is a Name Error?


program tries to use a variable that does not exist


What is a Type Error?


operation uses incorrect types (e.g. int(5) + string(four))


How do you check which version of Python editor you have?




1

,Page 2 of 60


import sys

print(sys.version)


How do you edit, save, and run a Python file?


edit = can edit in a text editor

save = save as file.py

run = in command prompt, type file.py


Can you run Python in the Command Line?


type python or py

you will see Python version information and >>>

when you are finished, type exit( )


What is unique about Python script formatting?


relies on indentation (whitespace) to define scope instead of curly brackets


Which Python datatypes are used to store arrays?


list, tuple, set, and dictionary


Which Python datatypes allow arrays with duplicates?


list and tuple


Which Python datatypes are for ordered arrays?



2

,Page 3 of 60


list, tuple, dictionary


Which Python datatypes are unchangeable?


tuple and set


What kind of variable would x = [ ] result in?


list


How do you determine how many items are in a list?


print(len(yourlist))


What are some characteristics of a list?


ordered; changeable; allows duplicate values; new values added to the end of the list; indexed

(first value if 0, second value is 1, etc.); values can be any datatype (and a mix of datatypes)


What are some characteristics of a tuple?


ordered; unchangeable; allows duplicate values


What are some characteristics of a set?


unordered; unchangeable (you can add or remove items, but you cannot change an item);

unindexed


What are some characteristics of a dictationary?



3

, Page 4 of 60


ordered; changeable; no duplicates


print(10 > 9)

print(10 == 9)

print (10 < 9)


Boolean


print(bool("Hello"))

print(bool("15"))

print(bool(x))


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




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 eddietaylor. 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