• ¿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 34 páginas
Examen

Programming (Python) Oa 2026 Midterm Exam Complete (100) Current Testing Questions And Correct Answers

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

Programming (Python) Oa 2026 Midterm Exam Complete (100) Current Testing Questions And Correct Answers

Vista previa del contenido

Page 1 of 34



PROGRAMMING (PYTHON) OA 2026
MIDTERM EXAM COMPLETE (100) CURRENT
TESTING QUESTIONS AND CORRECT
ANSWERS
Ace the WGU E010 Foundations of Programming (Python) OA midterm Exam
with practice questions covering variables, data types, input/output, arithmetic
operators, strings, lists, dictionaries, conditionals, loops, functions, and basic
debugging. This study guide helps reinforce foundational coding concepts and
supports effective preparation for objective assessments. Designed to improve
problem-solving skills and boost confidence in Python programming.
Suitable for computer science, IT, and programming students.



Multiple choice.

Section 1: Variables, Data Types & Type Conversion

1. Which of the following is a valid variable name in Python?
A) 2ndVariable
B) my-var
C) _myVar
D) my var
Answer: C. _myVar
Explanation: Variable names cannot start with a digit (A), cannot
contain hyphens (B) or spaces (D). Underscore is allowed, including
at the beginning.

, Page 2 of 34


2. What is the data type of 3.14?
A) int
B) float
C) str
D) bool
Answer: B. float
Explanation: Numeric values with a decimal point are of type float.
Integers are whole numbers without a decimal point.
3. What is the output of print(type())?
A) <class 'int'>
B) <class 'float'>
C) <class 'double'>
D) <class 'complex'>
Answer: B. <class 'float'>
Explanation: In Python, the / operator always returns a floating-point result,
even when the division is exact.
4. Which of the following will convert the string "123" to an integer?
A) int("123")
B) str("123")
C) float("123")
D) bool("123")
Answer: A. int("123")

, Page 3 of 34


Explanation: The int() function converts a string (or other numeric
type) to an integer. "123" contains only digits, so conversion is valid.
5. What is the result of bool([]) in Python?
A) True
B) False
C) None
D) Error
Answer: B. False
Explanation: Empty sequences (lists, strings, tuples) and the number 0
evaluate to False in a Boolean context. Non-empty sequences evaluate
to True.


‘’z Section 2: Arithmetic & Comparison Operators
6. What is the output of print(3 + 5 * 2)?
A) 16
B) 13
C) 10
D) 11
Answer: B. 13
Explanation: Multiplication has higher precedence than addition. First 5 * 2
= 10, then 3 + 10 = 13.
7. What does the % operator do in Python?
A) Percent

, Page 4 of 34


B) Modulus – returns the remainder of division
C) Division
D) Exponentiation
Answer: B. Modulus – returns the remainder of division Explanation:
The modulus operator % gives the remainder after integer division. Example:
10 % 3 returns 1.
8. Which operator is used for floor division?
A) /
B) //
C) %
D) **
Answer: B. //
Explanation: Floor division (//) divides and rounds down to the nearest
integer. 10 // 3 equals 3.
9. What is the output of print(5 ** 2)?
A) 10
B) 7
C) 25
D) 32
Answer: C. 25
Explanation: ** is the exponentiation operator. 5 raised to the power of 2
equals 25.
10. Which comparison operator means “not equal to”?

Información del documento

Subido en
6 de noviembre de 2026
Número de páginas
34
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$22.89

¿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

Vendido
12
Seguidores
0
Artículos
1125
Última venta
2 semanas 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