Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 50 páginas
Examen

LATEST PYTHON CERTIFICATION EXAM OFFERED BY PYTHON INSTITUTE | Q&A WITH RATIONALES

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

LATEST PYTHON CERTIFICATION EXAM OFFERED BY PYTHON INSTITUTE | Q&A WITH RATIONALES

Vista previa del contenido

LATEST PYTHON CERTIFICATION
EXAM OFFERED BY PYTHON
INSTITUTE | Q&A WITH
RATIONALES



PCEP-30-02 Exam

Block 1: Computer Programming and Python
Fundamentals (18%)

1. What is the output of the following code?

python
print()
print(type(4 // 2.0))


A) 2 <class 'int'>
B) 2.0 <class 'float'>
C) 2 <class 'float'>
D) 2.0 <class 'int'>

Correct answer: B
Rationale: returns a float (2.0). 4 // 2.0 performs floor division on a float,
returning a float (2.0).

,2. Which of the following are valid Python keywords? (Select two.)
A) def
B) function
C) import
D) include

Correct answer: A, C
Rationale: def is used to define functions, and import is used to import
modules. function and include are not Python keywords.




3. What is the result of 0b1111 in decimal?
A) 8
B) 12
C) 15
D) 16

Correct answer: C
Rationale: 0b1111 is binary for 15 (8 + 4 + 2 + 1).




4. What is the output of the following code?

python
x = 5
y = 2
print(x ** y)


A) 7
B) 10

,C) 25
D) 32

Correct answer: C
Rationale: ** is the exponentiation operator. 5 ** 2 = 25.




5. Which of the following variable names is NOT valid in Python?
A) _my_var
B) myVar2
C) 2myVar
D) my_var

Correct answer: C
Rationale: Variable names cannot start with a digit.




6. What is the output of the following code?

python
print(3 * "abc")


A) abcabcabc
B) abc abc abc
C) 3abc
D) Error

Correct answer: A
Rationale: The * operator repeats strings. 3 * "abc" produces "abcabcabc".

, 7. Which operator is used for floor division in Python?
A) /
B) %
C) //
D) **

Correct answer: C
Rationale: // performs floor division, returning the integer part of the quotient.




8. What is the result of 5 % 2?
A) 2.5
B) 2
C) 1
D) 0

Correct answer: C
Rationale: % is the modulo operator, returning the remainder of the division. 5 % 2
= 1.




9. Which of the following statements about Python indentation is TRUE?
A) Indentation is optional
B) Indentation defines blocks of code
C) Indentation is only for readability
D) Indentation uses curly braces

Información del documento

Subido en
18 de junio de 2026
Número de páginas
50
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$22.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.
IsaacRobie
4.0
(78)
Vendido
341
Seguidores
156
Artículos
4368
Última venta
1 semana 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