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
Examen

Programming Fundamentals Exam Practice Questions And Correct Answers (Verified Answers) Plus Rationale 2026 Q&A

Puntuación
-
Vendido
-
Páginas
37
Grado
A+
Subido en
24-06-2026
Escrito en
2025/2026

Programming Fundamentals Exam Practice Questions And Correct Answers (Verified Answers) Plus Rationale 2026 Q&A

Institución
Programming Fundamentals
Grado
Programming Fundamentals

Vista previa del contenido

Programming Fundamentals Exam Practice
Questions And Correct Answers (Verified
Answers) Plus Rationale 2026 Q&A

SECTION 1: VARIABLES, DATA TYPES, & OPERATORS
1. Which of the following is a valid variable name in most programming
languages?
A) 2ndPlace
B) my-variable
C) _privateValue
D) class
Correct Answer: C | Rationale: Variable names typically cannot start with a
number (A), cannot contain hyphens (B), and cannot be reserved keywords like
"class" (D). Underscores (_) are allowed as the first character.
2. In Python, what data type is the value 3.14?
A) Integer
B) String
C) Float
D) Boolean
Correct Answer: C | Rationale: A number with a decimal point is a floating-point
number (float). An integer (A) has no decimal. A string (B) is text enclosed in
quotes. A boolean (D) is True/False.
3. What is the result of 10 // 3 in Python?
A) 3.33
B) 3
C) 4
D) 3.0

,Correct Answer: B | Rationale: The // operator performs integer (floor) division,
discarding the remainder. 10 divided by 3 is 3 with a remainder of 1, so the result
is 3. / (single slash) would return 3.33 (float).
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: The ** operator is the exponentiation (power)
operator. 5 raised to the power of 2 is 5 × 5 = 25.
5. Which operator is used to compare two values for equality in most languages
(e.g., Java, C++, Python)?
A) =
B) ==
C) !=
D) ===
Correct Answer: B | Rationale: == is the equality comparison operator. = is the
assignment operator. != means "not equal." === is strict equality in some
languages (JavaScript) but == is the standard.
6. What is the value of total after this code executes?
python
total = 0
total += 5

,total *= 2
total -= 3
A) 7
B) 10
C) 4
D) 13
Correct Answer: A | *Rationale: total starts at 0. +=5 makes it 5. =2 makes it 10. -
=3 makes it 7.
7. Which data type can only hold two possible values (True/False)?
A) Integer
B) Character
C) Boolean
D) Array
Correct Answer: C | Rationale: A Boolean (bool) data type represents logical
values: True or False (or 1/0 in some languages).
8. What is the result of "Hello" + " " + "World" in most languages?
A) "Hello World"
B) "HelloWorld"
C) Error
D) "Hello + World"
Correct Answer: A | Rationale: The + operator concatenates (joins) strings. Adding
a space string " " between them produces "Hello World".
9. A variable declared inside a function is known as a:
A) Global variable
B) Local variable
C) Constant
D) Parameter

, Correct Answer: B | Rationale: A local variable is declared within a function and
can only be accessed inside that function. A global variable (A) is declared outside
all functions and can be accessed anywhere.
10. What is the value of remainder after this code?
python
remainder = 17 % 5
A) 3
B) 2
C) 5
D) 3.4
Correct Answer: B | Rationale: The % operator is the modulus (remainder)
operator. 17 divided by 5 is 3 with a remainder of 2.
11. Which of the following is NOT a primitive data type in most languages?
A) int
B) float
C) string
D) char
Correct Answer: C | Rationale: In many languages (Java, C), String is a reference
type/object, not a primitive. However, in Python, everything is an object. This
question reflects classical terminology where primitives are int, float, char,
boolean.
12. What is the output of this code?
python
a = 10
b=3
print(a / b)

Escuela, estudio y materia

Institución
Programming Fundamentals
Grado
Programming Fundamentals

Información del documento

Subido en
24 de junio de 2026
Número de páginas
37
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$23.79
Accede al documento completo:

¿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

Conoce al vendedor
Seller avatar
docwillowivy
5.0
(1)

Conoce al vendedor

Seller avatar
docwillowivy Walden University
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
8
Miembro desde
8 meses
Número de seguidores
1
Documentos
2160
Última venta
1 día hace
Elite Study Hub

Reach your academic goals with professionally crafted, high-quality educational materials designed to help you study efficiently and achieve success Thank you for purchasing my documents on stuvia ! I hope you found it helpful .If you:re satisfied with your purchase ,i would really appreciate it if you could leave a review .Your feedback helps other student and supports my work .Thank you for your support! In my Stuvia store, you’ll find a wide range of study guides, summaries, past exams, solved questions, and revision notes — all written to be clear, accurate, and easy to follow. Each resource is well-organized and based on trusted textbooks, lectures, and verified coursework, ensuring you always receive dependable and valuable content. These materials are perfect for exam preparation, coursework enhancement, and quick revision, helping you master complex topics, save study time, and improve your grades with confidence. Whether you’re a college student, lifelong learner, or preparing for certification exams, you’ll discover the right tools to make your studying more effective and enjoyable. I specialize in creating concise, time-saving notes that simplify challenging concepts without leaving out key information — empowering you to learn faster and perform better in exams. Trusted by students worldwide, all resources are available for instant download, giving you immediate access to premium study materials whenever you need them. Invest in your academic success today — study smarter, stay organized, and reach your goals with professional, accurate, and easy-to-understand learning resources designed to support your educational journey.

Lee mas Leer menos
5.0

1 reseñas

5
1
4
0
3
0
2
0
1
0

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