Definition of Python Python is a high-level, interpreted programming language known for its simplicity, readability, and versatility. Created by Guido van Rossum and first released in 1991, Python supports multiple programming paradigms, including procedural…
Read more31. What is the output of print(5 != 3)? a) True b) False c) None d) Error Answer: a) True 32. Which function returns the number of elements in a list? a) count() b) length() c) len() d) size() Answer: c) len() 33. What is the output of print(type(3.5))? a) &…
Read more16. What is the output of print(list(range(3)))? a) [0, 1, 2] b) [1, 2, 3] c) [0, 1, 2, 3] d) Error Answer: a) [0, 1, 2] 17. Which of the following methods adds an element to a set? a) append() b) insert() c) add() d) extend() Answer: c) add() 18. What is the…
Read more1. What is the output of the following code? print(2 * 3 ** 2) a) 36 b) 18 c) 12 d) 6 Answer: b) 18 2. Which data type is mutable in Python? a) String b) Tuple c) List d) Int Answer: c) List 3. What does len([1, 2, [3, 4]]) return? a) 2 b) 3 c) 4 d) Error Ans…
Read more
Social Plugin