1. Which of the following is the use of id() function in python? Every object doesn’t have a unique id Id returns the identity of the object All of the mentioned None of the mentioned 2. Is Python case sensitive when dealing with identifiers? yes no 3. All keywords in Python are in UPPER CASE lower case Capitalized None of the mentioned 4. Mathematical operations can be performed on a string. State whether true or false - False True 5. Which one of the following has the highest precedence in the expression? Addition Multiplication Exponential Parentheses 6. What is the return type of function id? float bool dict int 7. What is the output of the following? print("Hello {0!r} and {0!s}".format('foo', 'bin')) Hello ‘foo’ and foo Hello foo and foo Hello foo and ‘bin’ Error 8. Which of the following data types is not supported in python ? String Numbers Slice List 9. Which Of The Following Keywords Mark The Beginning Of The Class Definition? return class def All of the above 10. Select the reserved keyword in python- else raise import All of the above 11. Are nested if-else are allowed in Python? Yes no 12. Python allows string slicing. What is the output of below code: s='cppbuzz chicago' print(s[3:5]) buzzc pbuzz bu None of these 13. class test: def __init__(self): print "Hello World" def __init__(self): print "Bye World" obj=test() Bye World Hello World Compilation Error Ambiguity 14. The format function, when applied on a string returns : list bool int str 15. Which statement is correct....?? List is mutable & Tuple is immutable List is immutable & Tuple is mutable Both are Mutable. Both are Immutable 16. What is the maximum possible length of an identifier? 32 characters 63 characters 79 characters 31 Characters 17. Which one of the following is not a python's predefined data type? List Dictionary Tuple Class 18. What will be the output of 7^10 in python? 13 15 2 None of these 19. 19 % 2 in python 2 17 None of these 20. Which of the following has more precedance? / + () - 21. Is Tuple mutable? YesNo 22. Which of the following is a Python tuple? [3] {1, 2, 3} (1, 2, 3, 4) None of the Above 23. Which of the following is not a declaration of the dictionary? {1: 'A', 2: 'B'} {1, "A", 2"B"} dict([[1, "A"],[2,"B"]]) {} 24. Which of the following refers to mathematical function? sqrt add rhombus None of the above Loading...