Knowledge Test

Simple Quiz

Simple Quiz

1. What is the correct file extension for Python files?

  • A. .pt
  • B. .py
  • C. .pyt
  • D. .pyth

2. Which of the following is a valid variable name in Python?

  • A. 2nd_variable
  • B. variable-name
  • C. variable_name
  • D. variable.name

3. How do you create a list in Python?

  • A. list = {1, 2, 3}
  • B. list = (1, 2, 3)
  • C. list = [1, 2, 3]
  • D. list = <1, 2, 3>

4. What is the output of print(2 ** 3)?

  • A. 6
  • B. 8
  • C. 9
  • D. 16

5. Which of the following is used to take user input in Python?

  • A. input()
  • B. raw_input()
  • C. get_input()
  • D. scan()

Comments

Popular posts from this blog

1.2. Basic statistical concepts

Chapter 1: Introduction to Statistics