11. What is the result of the following operation 3+2*2 ?

  • 3
  • 7
  • 9

12. What is the result of the following code segment: type(int(12.3))

  • float
  • str
  • int

13. What is the result of the following code segment: int(True)

  • 1
  • 0
  • error

14. In Python, what is the result of the following operation: '1'+'2' ?

  • 3
  • ‘3’
  • ’12’

15. Given myvar = 'hello' , how would you return myvar as uppercase?

  • len(myvar)
  • myvar.find(‘hello’)
  • myvar.upper()

16. What is the result of the following : str(1+1) ?

  • ‘2’
  • ’11’

17. What is the result of the following: "ABC".replace("AB", "ab") ?

  • ‘abC’
  • ‘ABc’

18. In Python 3, what is the type of the variable x after the following: x=1/1 ?

  • float
  • int

Leave a Reply