- Type
- MCQs
- Course
- CS441 Big Data Concepts
- Size
- PDF 27 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 23. Download the file for all 23 pages.
Q1. What is the correct file extension for Python files?
Correct answer: .py [Correct]
Explanation: Python scripts and modules use the '.py' extension so they can be recognized and executed by the Python interpreter.
Q2. Which data structure is immutable in Python?
Correct answer: Tuple [Correct]
Explanation: Tuples are immutable, meaning their elements cannot be changed, added, or removed after creation, unlike Lists, Sets, and Dictionaries.
Q3. What is the output of: len([1, 2, 3, 4])?
Correct answer: 4 [Correct]
Explanation: The len() function returns the total number of items in an iterable. The list [1, 2, 3, 4] contains exactly 4 integer elements.
Q4. What is Pandas mainly used for?
Correct answer: Data manipulation and analysis [Correct]
Explanation: Pandas is a powerful library built on NumPy specifically designed for structured data manipulation, analysis, and cleaning using DataFrames and Series.
Q5. What does df.head() do in Pandas?
Correct answer: Returns first 5 rows [Correct]
Explanation: By default, the .head() method returns the first 5 rows of a DataFrame to help quickly inspect the data.
Q6. Which method is used to read a CSV file using Pandas?
Correct answer: read_csv [Correct]
Explanation: The pd.read_csv() function is the standard method in Pandas for loading comma-separated values (CSV) into a DataFrame.
Q7. What library is commonly used for numerical computing in Python?
Correct answer: NumPy [Correct]
Explanation: NumPy provides support for large, multi-dimensional arrays and matrices, along with mathematical functions to operate on these arrays efficiently.
Q8. What does the .shape attribute of a DataFrame return?
Correct answer: Tuple of (rows, columns) [Correct]
Explanation: The .shape attribute returns a tuple representing the dimensionality of the DataFrame, formatted as (number_of_rows, number_of_columns).
Q9. Which of the following is not a data type in Python?
Correct answer: Character [Correct]
Explanation: Python does not have a distinct "character" data type. A single character is simply treated as a string of length 1.
Q10. How do you insert comments in Python code?
Correct answer: # [Correct]
Explanation: The hash symbol (#) is used in Python to indicate a single-line comment, which is ignored by the interpreter.
Q11. What is the keyword to define a function in Python?
Correct answer: def [Correct]
Explanation: The 'def' keyword is used to declare and define a new custom function block in Python.
Q12. What is the correct way to import the NumPy library?
Correct answer: import numpy as np [Correct]
Explanation: The standard convention is to import numpy with the alias 'np' for shorter syntax when calling its methods.
Q13. How do you handle exceptions in Python?
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.