Python Basic Board Questions


  1. Identify the valid Python statement from the following : [1 MARK] [2024]

    a)  d=dict()	
    b)  e={}	          
    c)  f=[]  	          
    d)  g=dict{}
  2. d) g=dict{}

  3. What will be the output of the following statement ? [1 MARK] [2024]

    print ( 16 * 5 / 4 * 2 / 5 - 8 )
    a)  -3.33		
    b)  6.0		         
    c)  0.0		          
    d)  -13.33
  4. c) 0.0

  5. What will the following expression be evaluated to in Python ? [1 MARK] [2023]

    print ( 4 + 3 * 5 / 3 - 5 % 2 )
    a)  8.5		
    b)  8.0		          
    c)  10.2		          
    d)  10.0
    
  6. b) 8.0

  7. Which of the following operators will return either True or False ? [1 MARK] [2023]
    a)  +=		
    b)  !=		          
    c)  =		          
    d)  *=
    
  8. b) !=
    
    or
    
    No option OR Error in question
    
    Note:
    an operator does not return any values until it is part of an expression
    

  9. Consider the given expression :

    5 < 10 and 12 > 7 or not 7 > 4

    Which of the following will be the correct output, if the given expression is evaluated ? [1 MARK] [2023]
    a)  True 		
    b)  False	          
    c)  NONE	          
    d)  NULL
    
  10. a) True

  11. Which of the following is a valid keyword in Python? [1 MARK] [2023]
    a)  false
    b)  return
    c)  non_local
    d)  none
    
  12. b) return

  13. State True or False. [1 MARK] [2023]

    "Identifiers are names used to identify a variable, function in a program"
  14. True