Skip to content

MCQ on Statement , Comment and Variables  #3

@sheetalparmar99

Description

@sheetalparmar99
  1. Which of the following symbol are used for comment in python ?
    A. #
    B. " " "
    C. A and B
    D. None of the above.
  2. Most of the programming languages like C, C++, and Java use braces { } to define a block of code. Python, however, uses ________.
    A. Indentation
    B.Semi-Colon
    C.Parentheses
    D.None of the above
  3. Which of the following will give error?
    A. a=b=c=1
    B. a,b,c=1
    C. a,b,c=1, "Hello", 1.5
    D. None of the above
  4. Which one of the following is correct way of declaring and initialising a variable, x with value 5?
    A. int x
    x=5
    B. int x=5
    C. x=5
    D.declare x=5
  5. In Python, a variable must be declared before it is assigned a value:
    A. True.
    B. False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions