Multiple Choice Questions-start Python

19 Questions | Total Attempts: 45

SettingsSettingsSettings
Please wait...
Multiple Choice Questions-start Python

.


Questions and Answers
  • 1. 
    Which is the correct operator for power(xy)?
    • A. 

      X^y

    • B. 

      X**y

    • C. 

      X^^y

    • D. 

      None of the mentioned

  • 2. 
    Which one of these is floor division?
    • A. 

      /

    • B. 

      //

    • C. 

      % d

    • D. 

      None of the mentioned

  • 3. 
    What is answer of this expression, 22 % 3 is?
    • A. 

      7

    • B. 

      1

    • C. 

      0

    • D. 

      5

  • 4. 
    Operators with the same precedence are evaluated in which manner?
    • A. 

      Left to Right

    • B. 

      Right to Left

    • C. 

      Can‘t say

    • D. 

      None of the mentioned

  • 5. 
    What is the output of this expression, 3*1**3?
    • A. 

      27

    • B. 

      9

    • C. 

      3

    • D. 

      1

  • 6. 
    Which one of the following have the same precedence?
    • A. 

      Addition and Subtraction

    • B. 

      Multiplication and Division

    • C. 

      Both Addition and Subtraction AND Multiplication and Division

    • D. 

      None of the mentioned

  • 7. 
    Which one of the following have the highest precedence in the expression?
    • A. 

      Exponential

    • B. 

      Addition

    • C. 

      Multiplication

    • D. 

      Parentheses

  • 8. 
    The value of the expression: 4 + 3 % 5
    • A. 

      4

    • B. 

      7

    • C. 

      2

    • D. 

      0

  • 9. 
    Evaluate the expression given below if A= 16 and B = 15. A % B // A
    • A. 

      0.0

    • B. 

      0

    • C. 

      1.0

    • D. 

      1

  • 10. 
    Is Python case sensitive when dealing with identifiers?
    • A. 

      Yes

    • B. 

      No

    • C. 

      Machine dependent

    • D. 

      None of the mentioned

  • 11. 
    Which of the following is an invalid variable?
    • A. 

      My_string_1

    • B. 

      1st_string

    • C. 

      Foo

    • D. 

      _

  • 12. 
    Which of the following is not a keyword?
    • A. 

      Eval

    • B. 

      Assert

    • C. 

      Nonlocal

    • D. 

      Pass

  • 13. 
    All keywords in Python are in _________
    • A. 

      Lower case

    • B. 

      UPPER CASE

    • C. 

      Capitalized

    • D. 

      None of the mentioned

  • 14. 
    Which of the following is true for variable names in Python?
    • A. 

      Unlimited length

    • B. 

      All private members must have leading and trailing underscores

    • C. 

      Underscore and ampersand are the only two special characters allowed

    • D. 

      None of the mentioned

  • 15. 
    Which of the following is an invalid statement?
    • A. 

      Abc = 1,000,000

    • B. 

      A b c = 1000 2000 3000

    • C. 

      A,b,c = 1000, 2000, 3000

    • D. 

      A_b_c = 1,000,000

  • 16. 
    Which of these in not a core data type?
    • A. 

      Lists

    • B. 

      Dictionary

    • C. 

      Tuples

    • D. 

      Class

  • 17. 
    What data type is the object below? L=[1,23,’hello’,1]
    • A. 

      List

    • B. 

      Dictionary

    • C. 

      Array

    • D. 

      Tuple

  • 18. 
    In order to store values in terms of key and value we use what core data type.
    • A. 

      List

    • B. 

      Tuple

    • C. 

      Class

    • D. 

      Dictionary

  • 19. 
    Which of the following operators has its associativity from right to left?
    • A. 

      +

    • B. 

      //

    • C. 

      %

    • D. 

      **

Back to Top Back to top