0% found this document useful (0 votes)
7 views6 pages

Python Questions

The document contains a set of 30 multiple-choice questions focused on Python and data engineering concepts. It covers topics such as pandas functions, data types, object-oriented programming, and cloud storage services. Each question is accompanied by four answer options, with the correct answer indicated for each.

Uploaded by

alaakhidr283
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views6 pages

Python Questions

The document contains a set of 30 multiple-choice questions focused on Python and data engineering concepts. It covers topics such as pandas functions, data types, object-oriented programming, and cloud storage services. Each question is accompanied by four answer options, with the correct answer indicated for each.

Uploaded by

alaakhidr283
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python & Data Engineering – MCQ Revision (30

Questions)

1. Which function is used to create a pivot table in pandas?

1 A) groupby()
2 B) merge()
3 C) pivot_table()
4 D) concat()
Correct Answer: C

2. Which of the following is a cloud storage service?

1 A) Google Docs
2 B) AWS S3
3 C) MySQL
4 D) Pandas
Correct Answer: B

3. Which NumPy function creates an array of zeros?

1 A) [Link]()
2 B) [Link]()
3 C) [Link]()
4 D) [Link]()
Correct Answer: C

4. What is the main role of a Data Engineer?

1 A) UI design
2 B) Build data pipelines
3 C) Graphic design
4 D) App testing
Correct Answer: B

5. Which application collects watch history and preferences?

1 A) Google Maps
2 B) Netflix
3 C) Dropbox
4 D) Zoom
Correct Answer: B

6. Which library is used for plots and graphs in Python?

1 A) NumPy
2 B) Pandas
3 C) Matplotlib
4 D) TensorFlow
Correct Answer: C

7. Which of the following is a programming language?

1 A) HTML
2 B) Python
3 C) AWS
4 D) Pandas
Correct Answer: B

8. Seaborn is mainly built on top of which library?

1 A) NumPy
2 B) Pandas
3 C) Matplotlib
4 D) SciPy
Correct Answer: C

9. Which pandas structure stores 1D labeled data?

1 A) DataFrame
2 B) Series
3 C) List
4 D) Tuple
Correct Answer: B

10. Which pandas object is best for tabular data?

1 A) Series
2 B) NumPy Array
3 C) DataFrame
4 D) Dictionary
Correct Answer: C

11. What does OOP stand for?

1 A) Object Oriented Programming


2 B) Open Online Program
3 C) Ordered Object Process
4 D) None
Correct Answer: A

12. Which OOP concept allows multiple forms of the same method?

1 A) Inheritance
2 B) Polymorphism
3 C) Encapsulation
4 D) Abstraction
Correct Answer: B

13. Which OOP concept helps hide internal details?

1 A) Inheritance
2 B) Polymorphism
3 C) Encapsulation
4 D) Compilation
Correct Answer: C

14. Which data structure stores unique values only?

1 A) List
2 B) Tuple
3 C) Set
4 D) Dictionary
Correct Answer: C

15. Which function shows the first 5 rows in pandas?

1 A) show()
2 B) head()
3 C) top()
4 D) first()
Correct Answer: B

16. Which library is mainly used for numerical computing?

1 A) Matplotlib
2 B) NumPy
3 C) Seaborn
4 D) Flask
Correct Answer: B

17. Which pandas function is used to read CSV files?

1 A) read_excel()
2 B) read_table()
3 C) read_csv()
4 D) load_csv()
Correct Answer: C

18. Which of the following is NOT a Python data type?

1 A) list
2 B) tuple
3 C) array
4 D) dictionary
Correct Answer: C

19. Which keyword is used to define a function in Python?

1 A) func
2 B) define
3 C) def
4 D) function
Correct Answer: C

20. Which symbol is used for comments in Python?

1 A) //
2 B)
3 C) #
4 D) **
Correct Answer: C

21. Which of the following represents missing data in pandas?

1 A) 0
2 B) None
3 C) NaN
4 D) Empty
Correct Answer: C

22. Which method is used to check dataframe information?

1 A) describe()
2 B) info()
3 C) shape()
4 D) details()
Correct Answer: B

23. Which data structure is mutable?

1 A) Tuple
2 B) String
3 C) List
4 D) Integer
Correct Answer: C

24. Which loop is commonly used to iterate over a sequence?

1 A) if
2 B) while
3 C) for
4 D) switch
Correct Answer: C

25. Which function returns the number of items in an object?

1 A) count()
2 B) size()
3 C) length()
4 D) len()
Correct Answer: D

26. Which of the following is a Python framework?

1 A) Django
2 B) NumPy
3 C) Pandas
4 D) Seaborn
Correct Answer: A

27. Which file format is commonly used for big data storage?

1 A) TXT
2 B) CSV
3 C) Parquet
4 D) DOCX
Correct Answer: C

28. Which cloud service is used for object storage?

1 A) EC2
2 B) RDS
3 C) S3
4 D) Lambda
Correct Answer: C

29. Which concept allows code reuse in OOP?

1 A) Abstraction
2 B) Polymorphism
3 C) Inheritance
4 D) Encapsulation
Correct Answer: C

30. Which of the following best describes a data structure?

1 A) Programming language
2 B) Way to organize data
3 C) Cloud platform
4 D) Visualization tool
Correct Answer: B

You might also like