[Type A] Python Revision Tour-1 – Chapter 1

|
Table of Contents

20. Below are seven segments of code. Indicate the data type of each colored part.

  1. if temp < 32 : bool
  2. L = [ ‘Hiya’, ‘Zoya’, Preet’ ] print(L[1]) str
  3. M = [ ] for i in range (3) : M. append (i) print(M) list of int
  4. L = [ ‘Hiya’, ‘Zoya’, ‘Preet’ ] n = len (L) if ‘Donald’ in L[1: n] : print (L) str
  5. if n% 2 == 0 : print(“Freezing”) bool
  6. L = inputline.split() while L != ( ) : print (L) L = L[1:] list of str
  7. L= [ ‘Hiya’, Zoya’, ‘Preet’ ] print (L[0] + L[1] ) str
"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *