• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 35 páginas
Examen

Wgu Python D522 Updated Actual Questions With Correct Answers

Document preview thumbnail
Vista previa 4 fuera de 35 páginas

Wgu Python D522 Updated Actual Questions With Correct Answers

Vista previa del contenido

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

Información del documento

Subido en
3 de noviembre de 2026
Número de páginas
35
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$17.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
TopGradeInsider
4.1
(14)
Vendido
206
Seguidores
1
Artículos
68189
Última venta
5 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes