quiz

Python Basics

1. Which type of language is Python?

  • A) High-level, interpreted
  • B) Low-level, compiled
  • C) High-level, compiled
  • D) Low-level, interpreted
A) High-level, interpreted Explanation

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

  • A) function
  • B) def
  • C) define
  • D) fun
B) def Explanation

3. What will happen if special characters are used in identifiers?

  • A) The program will run normally
  • B) The interpreter will ignore them
  • C) It will raise a SyntaxError
  • D) It will raise a ValueError
C) It will raise a SyntaxError Explanation