• Falsches Dokument? Kostenlos tauschen
  • Geschrieben von Student*innen, die bestanden haben
  • Sofort verfügbar nach Zahlung
  • Online lesen oder als PDF
Verkaufen
Wo studierst du
Deine Sprache
Document preview thumbnail
Vorschau 4 aus 35 Seiten
Prüfung

Wgu Python D522 Updated Actual Questions With Correct Answers

Document preview thumbnail
Vorschau 4 aus 35 Seiten

Wgu Python D522 Updated Actual Questions With Correct Answers

Inhaltsvorschau

WGU PYTHON D522 UPDATED ACTUAL QUESTIONS
WITH CORRECT ANSWERS

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

ANSWER
list


Question 2.
What is a Name Error?

ANSWER
program tries to use a variable that does not exist


Question 3.
What are the identity operators?

ANSWER
is, is not


Question 4.
print(bool("Hello")) print(bool("15")) print(bool(x))
ANSWER
Boolean examples of True


Question 5.
float( )
ANSWER
casts a float from an integer literal, a float literal, or a string literal






,Question 6.
What is a continue statement?
ANSWER
Causes a loop to immediately jump back to the while or for statement


Question 7.
How do you denote a modifier in an f-string placeholder?
ANSWER
in placeholder, after name of variable or value, use a : followed by formatting type e.g., txt =
f"The price is {95:.2f} dollars"


Question 8.
How do you denote a placeholder in an f-string?

ANSWER
{}
e.g., txt = f"The price is {price} dollars"


Question 9.
What is the modifier to show the value in decimal format?
ANSWER
:d


Question 10.
What are some characteristics of a tuple?
ANSWER
ordered; unchangeable; allows duplicate values






,Question 11.
How to print an * rectangle
ANSWER
num_rows = int(input())
num_cols = int(input())
for a in range(num_rows):
for b in range(num_cols):
print('*', end=' ')
print()


Question 12.
What is the modifier to show the value in hex format?

ANSWER
:x lowercase
:X uppercase


Question 13.
What is dynamic typing?
ANSWER
the interpreter determines the type of objects as the program executes; the programmer does
not have to define them


Question 14.
Which modifiers are used to show a value's positive or negative sign?

ANSWER
:= shows negative sign in the left most position
:+ shows sign for positive and negative numbers
:- shows sign for negative number only
:(space) shows sign for negative and an extra space for a positive number


Question 15.
print(a.replace("H", "J"))
ANSWER
replace a string with another string





, Question 16.
What modifiers are used to set thousand separators?
ANSWER
:, comma
:_ underscore


Question 17.
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"))


Question 18.
What does an interpreter do with objects?

ANSWER
creates and manipulates objects as needed to run code; assigns an object to a location
somewhere in memory


Question 19.
What is the modifier to show the value in scientific format?
ANSWER
:e
:E for uppercase E


Question 20.
How do you name a variable versus a constant?

ANSWER
variable_name CONSTANT_NAME

Dokument Information

Hochgeladen auf
3. november 2026
Anzahl der Seiten
35
geschrieben in
2026/2027
Typ
Prüfung
Enthält
Fragen & antworten
$17.99

Falsches Dokument? Kostenlos tauschen Innerhalb von 14 Tagen nach dem Kauf und vor dem Herunterladen kannst du ein anderes Dokument wählen. Du kannst den Betrag einfach neu ausgeben.
Geschrieben von Student*innen, die bestanden haben
Sofort verfügbar nach Zahlung
Online lesen oder als PDF

Seller avatar
Bewertungen des Ansehens basieren auf der Anzahl der Dokumente, die ein Verkäufer gegen eine Gebühr verkauft hat, und den Bewertungen, die er für diese Dokumente erhalten hat. Es gibt drei Stufen: Bronze, Silber und Gold. Je besser das Ansehen eines Verkäufers ist, desto mehr kannst du dich auf die Qualität der Arbeiten verlassen.
TopGradeInsider
4.1
(14)
Verkauft
206
Anhänger
1
Sachen
68189
Zuletzt verkauft
6 Jahren vor



Warum sich Studierende für Stuvia entscheiden

on Mitstudent*innen erstellt, durch Bewertungen verifiziert

Geschrieben von Student*innen, die bestanden haben und bewertet von anderen, die diese Studiendokumente verwendet haben.

Nicht zufrieden? Wähle ein anderes Dokument

Kein Problem! Du kannst direkt ein anderes Dokument wählen, das besser zu dem passt, was du suchst.

Bezahle wie du möchtest, fange sofort an zu lernen

Kein Abonnement, keine Verpflichtungen. Bezahle wie gewohnt per Kreditkarte oder Sofort und lade dein PDF-Dokument sofort herunter.

Student with book image

“Gekauft, heruntergeladen und bestanden. So einfach kann es sein.”

Alisha Student

Arbeitest du an deiner Quellenangabe?

Erstelle korrekte Quellenangaben in APA, MLA und Harvard mit unserem kostenlosen Zitiergenerator.

Arbeitest du an deiner Quellenangabe?

Häufig gestellte Fragen