Python For Data Science Quiz : 02

Python for Data Science Quiz

Python for Data Science Quiz

Test your knowledge by answering the following questions:

Time Remaining: 03:20

1. What data type is used to represent whole numbers in Python?

A) String B) Integer C) Float D) Boolean

2. Which of the following is a floating-point number in Python?

A) 7 B) 7.0 C) '7' D) True

3. Which statement is used to make decisions based on conditions in Python?

A) Loop B) Conditional C) Function D) Print

4. Which loop in Python is used to iterate over a sequence of elements?

A) For Loop B) While Loop C) Do-While Loop D) None of the above

5. What function is used to display output in Python?

A) echo() B) printf() C) print() D) show()

6. How do you define a function in Python?

A) create myFunction() B) def myFunction(): C) function myFunction() D) define myFunction()

7. Which of the following represents a boolean value in Python?

A) 1 B) 'True' C) True D) 0

8. Which tool is used to manage Python packages and environments?

A) Anaconda B) Visual Studio Code C) PyCharm D) Microsoft Word

9. What is the main use of Jupyter Notebook?

A) Video editing B) Creating and running interactive notebooks C) Photo editing D) Designing websites

10. Which control structure is used to repeat a block of code in Python?

A) Conditional B) Loop C) Function D) Variable