Python Introduction Quiz

10 Questions | Total Attempts: 1467

SettingsSettingsSettings
Please wait...
Python Introduction Quiz

.


Questions and Answers
  • 1. 
    Which of the following statements is true?
    • A. 

      Python is a high level programming language.

    • B. 

      Python is an interpreted language

    • C. 

      Python is an object-oriented language.

    • D. 

      All of the above.

  • 2. 
    What is used to define a block of code (body of loop, function etc.) in Python?
    • A. 

      Curly braces

    • B. 

      Parenthesis

    • C. 

      Indentation

    • D. 

      Quotation

  • 3. 
    Which of the following is correct?
    • A. 

      Comments are for programmers for better understanding of the program.

    • B. 

      Python Interpreter ignores comment.

    • C. 

      You can write multi-line comments in Python using triple quotes, either ''' or """.

    • D. 

      All of the above

  • 4. 
    Which of the following is correct?
    • A. 

      Variable name can start with an underscore

    • B. 

      Variable name can start with a digit.

    • C. 

      Keywords cannot be used as a variable name.

    • D. 

      Variable name can have symbols like: @, #, $ etc.

  • 5. 
    In the following code, n is a/an _______? n = '5'
    • A. 

      Integer

    • B. 

      String

    • C. 

      Tuple

    • D. 

      Operator

  • 6. 
    What is the output of the following code? print(1, 2, 3, 4, sep='*')
    • A. 

      1 2 3 4

    • B. 

      1234

    • C. 

      1*2*3*4

    • D. 

      24

  • 7. 
    What is used to take input from the user in Python?
    • A. 

      Vin

    • B. 

      Scanf()

    • C. 

      Input()

    • D. 

      <>

  • 8. 
    What is the output of the following code? numbers = [2, 3, 4] print(numbers)
    • A. 

      2, 3, 4

    • B. 

      2 3 4

    • C. 

      [2, 3, 4]

    • D. 

      [1 2 3]

  • 9. 
    What is the output of the following code? print(3 >= 3)
    • A. 

      3 >= 3

    • B. 

      True

    • C. 

      False

    • D. 

      None

  • 10. 
    The statement using and operator results true if _______
    • A. 

      Both operands are true

    • B. 

      Both operands are false

    • C. 

      Either of the operands is true

    • D. 

      First operand is true

Back to Top Back to top