Finals Mock Exam Review
(Questions & Solutions)
2025
©2025
, Question 1:
A data scientist must choose between Python and R for a large-scale
financial analytics project requiring high-performance statistical
computation and robust visualization. Which factor is MOST critical when
deciding between these languages for enterprise-level data processing?
- A. The availability of packages for natural language processing
- B. The scalability and integration with big data frameworks
- C. The ease of scripting small-scale tasks
- D. The support for rapid prototyping in academic research
ANS: B. The scalability and integration with big data frameworks
Rationale: In enterprise-level projects, scalability and integration with
big data frameworks (e.g., Spark with PySpark or Sparklyr for R) are
crucial. While both languages excel in statistical computation and
visualization, the language that integrates better with distributed
systems is preferable for large-scale financial analytics.
---
Question 2:
Which of the following best describes a statically typed programming
language?
- A. Variable types are determined at runtime
- B. Type checking occurs during compilation
- C. It requires extensive type annotations only for function parameters
- D. It allows variables to change types over the course of execution
ANS: B. Type checking occurs during compilation
Rationale: In statically typed languages, data types are checked at
compile‑time, reducing runtime errors and often improving performance
and maintainability—a key consideration in data programming where
reliability is critical.
©2025
,---
Question 3:
A software engineer is using functional programming techniques in a
data processing language. Which of the following features is NOT
typically associated with functional programming?
- A. First-class functions
- B. Immutability of data
- C. Side-effect free functions
- D. Extensive mutable state manipulation
ANS: D. Extensive mutable state manipulation
Rationale: Functional programming emphasizes immutability and
functions that produce no side effects. Extensive mutable state
manipulation is contrary to functional programming principles and can
lead to errors in concurrent data processing.
---
Question 4:
Consider a scenario where a business analyst must manipulate large
datasets in Python. Which library provides efficient, vectorized
operations that are crucial for performance in data-intensive
computations?
- A. TensorFlow
- B. NumPy
- C. Scikit-learn
- D. Flask
ANS: B. NumPy
Rationale: NumPy is the foundational package in Python for numerical
computing. It offers vectorized operations on arrays, which are essential
for efficiently processing large datasets.
---
©2025
, Question 5:
Which of the following best differentiates interpreted languages from
compiled languages?
- A. Interpreted languages are converted directly into machine
language before execution.
- B. Compiled languages typically offer faster runtime performance
because the code is pre-translated into machine code.
- C. Interpreted languages require more extensive development cycles
than compiled languages.
- D. Compiled languages cannot be used for scripting or rapid
prototyping.
ANS: B. Compiled languages typically offer faster runtime
performance because the code is pre-translated into machine code.
Rationale: Compiled languages (like C++ or Java) are translated into
machine code ahead of time, which generally results in faster execution
than interpreted languages (like Python or JavaScript), where the
interpreter reads and executes the code on the fly.
---
Question 6:
A company plans to develop an application that requires handling real-
time data streams and high-concurrency. Which programming language,
known for its strong concurrency primitives and functional programming
features, is most suitable for this task?
- A. Python
- B. JavaScript
- C. Scala
- D. PHP
ANS: C. Scala
Rationale: Scala offers robust support for concurrency and functional
programming, with native integration into the Apache Spark ecosystem
©2025