Home / CSE MCQs / Python MCQs :: Python Variable Names, Operators, Data & Numeric Types

CSE MCQs :: Python MCQs

  1. What is the output of this expression, 3*1**3?
  2. A.
    27
    B.
    9
    C.
    3
    D.
    1

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following will run without errors ?
  4. A.
    round(45.8)
    B.
    round(6352.898,2,5)
    C.
    round()
    D.
    round(7463.123,2,1)

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. What dataype is the object below ?

    L = [1, 23, 'hello', 1].
  6. A.
    list
    B.
    dictionary
    C.
    array
    D.
    tuple

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. What does --------- 5 evaluate to?
  8. A.
    +5
    B.
    -11
    C.
    +11
    D.
    -5

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. What is the result of round(0.5) “ round(-0.5)?
  10. A.
    1.0
    B.
    2.0
    C.
    0.0
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. What is the maximum possible length of an identifier?
  12. A.
    31 characters
    B.
    63 characters
    C.
    79 characters
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. All keywords in Python are in
  14. A.
    lower case
    B.
    UPPER CASE
    C.
    Capitalized
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which of the following is an invalid statement?
  16. 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

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of these in not a core datatype?
  18. A.
    Lists
    B.
    Dictionary
    C.
    Tuples
    D.
    Class

    View Answer

    Workspace

    Discuss Discuss in Forum