• ¿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 2 fuera de 14 páginas
Examen

WGU E010 FoUndations oF ProGramminG (Python) PracticE QUEstions

Document preview thumbnail
Vista previa 2 fuera de 14 páginas

WGU E010 FoUndations oF ProGramminG (Python) PracticE QUEstions

Vista previa del contenido

WGU E010 FoUndations oF
ProGramminG (Python) PracticE
QUEstions
sEction 1: VariablEs, data tyPEs,
and basic syntax (QUEstions 1–15)
1. What is the output of print(type()) in Python?

A. <class 'int'>
B. <class 'float'>
C. <class 'double'>
D. <class 'str'>

Answer: B
Rationale: In Python, the / operator performs true division and always returns a float, even
when numbers divide evenly. = 5.0, so type(5.0) is <class 'float'> .

2. Which of the following is a valid variable name in Python?

A. 2nd_place
B. my_var
C. my-var
D. class

Answer: B
Rationale: Python variable names must start with a letter or underscore, cannot contain
hyphens, and cannot be reserved keywords. 2nd_place starts with a digit, my-var contains a
hyphen, and class is a reserved keyword .

3. What is the data type of the value 3.14 in Python?

A. int
B. float
C. string
D. Boolean

Answer: B
Rationale: Numbers with a decimal point are of type float (floating-point). Integers have no
decimal point .

, 4. Given x = 5 and y = 2, what is the result of x // y?

A. 2.5
B. 2
C. 2.0
D. 1

Answer: B
Rationale: The floor division operator // returns the integer quotient and discards the
remainder. 5 // 2 = 2 .

5. Which operator is used to check if two values are equal in Python?

A. =
B. ==
C. !=
D. ===

Answer: B
Rationale: == is the equality comparison operator. = is assignment. != means not equal. ===
is not valid in Python .

6. What is the output of print(type(10))?

A. <class 'int'>
B. <class 'integer'>
C. 'int'
D. <int>

Answer: A
Rationale: The type() function returns the type object; printing it displays <class 'int'> .

7. What will the following code output? print(3 + 2 * 4)

A. 20
B. 14
C. 11
D. 24

Answer: C
Rationale: Operator precedence: multiplication before addition. 2 * 4 = 8, then 3 + 8 = 11 .

8. Which correctly converts the string "123" to an integer?

A. int("123")
B. integer("123")
C. str(123)
D. float("123")

Información del documento

Subido en
2 de noviembre de 2026
Número de páginas
14
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$22.49

¿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.
WORLDNURSETEST
4.0
(265)
Vendido
154
Seguidores
61
Artículos
3254
Última venta
4 días 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